window.onerror does not catch DOMException
I am running an angularjs application on a chrome browser and want to log all the errors that are thrown. I am using the following in order to do that:
This appears to work fine for any js errors, however it doesn't seem to fire for the following:
Error: TYPE_MISMATCH_ERR: DOM Exception 17 Error: The type of an object was incompatible with the expected type of the parameter associated to the object.
ReferenceError: socket is not defined