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:

window.onerror = function(message, url, linenumber) {
        alert("JavaScript error: " + message + " on line " + linenumber + " for " + url);
        log.error("JavaScript error: " + message + " on line " + linenumber + " for " + url);

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

Any ideas?


Need Your Help

Jade 'each' iterator is iterating extra object properties?

javascript express jade

I'm using node, express, and jade. I seem to be iterating over two extra object properties added by jade. I'm passing in rows which is an array of objects.

Why does formatting the secondary axis result in an error?

excel excel-vba charts excel-2007

I've created a function that creates charts from data arrays. Sometimes it works fine, sometimes it doesn't, for unclear reasons. If it doesn't, it gives the following error:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.