Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onerror = function(msg, url, line, col, error) {
- // Note that col & error are new to the HTML 5 spec and may not be
- // supported in every browser. It worked for me in Chrome.
- var extra = !col ? '' : '\ncolumn: ' + col;
- extra += !error ? '' : '\nerror: ' + error;
- alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);
- var suppressErrorAlert = true;
- // If you return true, then error alerts (like in older versions of
- // Internet Explorer) will be suppressed.
- return suppressErrorAlert;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement