[Debug] Made the Error handler use the internal emitDebugEvent method.

And minor docblock fixes.