JsHint: Added code to error messages

More improvements for #392.

* Added code to error messages.
* Rescued from NullReferenceException.