What i try to accomplish is to register a global handler to catch all uncaught exceptions. Searching the web i only managed to find people pointing out window.onerror but this doesn't do the trick for me. Apparently window.onerror only gets called upon errors and not upon exceptions. Assume the following code:
function windowError(message, url, line) {
alert(message, url, line);
}
window.onerror=windowError;
throw("uncaught");
The obviously uncaught exception won't trigger the windowError handler. (Using Firefox 3.6.3)
Any suggestions?