What I'm trying to do is register a global handler to catch all the uncaught exceptions. Searching the Internet I managed to find people pointing out window.onerror , but that doesn't do the trick for me. Obviously, window.onerror raises only errors, not exceptions. Assume the following code:
function windowError(message, url, line) { alert(message, url, line); } window.onerror=windowError; throw("uncaught");
Obviously, an uncaught exception does not raise a windowError handler. (Using Firefox 3.6.3)
Any suggestions?
javascript exception
Taloncor
source share