Is there any way I could catch any uncaught exception in javascript? I mean, all my \"dangerous\" code are in try-catch blocks. But what about exceptions that I don\'t handl
How about
function func_madness() { throw("This function is throwing exceptions, because \n" + "it can not throw polar bears and whales.\n"); } // func_madness window.onload = function () { try { func_madness(); } catch (err) { document.write("Caught it!\n\n" + err); } // catch } // window.onload