Is there a way in Javascript to listen to on throw events?
I want to be able to have an event handler be called even when code like this is executed:
var hi = "hi";
try {
throw hi;
}
catch (e) {
}
In chrome (and maybe firebug too) you can run this code and hit "break on all errors" and it will break on that throw line. How exactly are they doing that? Is that outside of Javascript?
How they are doing that is the JavaScript engine doesn't continue over errors, it crashes on all error, like if you compiling c++, it is not a language feature, its the browser