I\'m trying to debug our handling of window.onerror. I\'ve created a function that will throw an error (invoking another function that does not exist). I\'ve tried calling
They don't (in Chrome where I tested), easy way to test is
window.onerror = function () {console.log('error!');}; throw new Error(); // Error
You can make them do it if you defer them, though
window.setTimeout(function() {throw new Error()}, 0); // error! // Uncaught Error