Report declaration emit errors

Fixes #628
not sure i understand thsi comment.  could you clarify.