Created
May 15, 2012 10:57
-
-
Save ajaxray/2700829 to your computer and use it in GitHub Desktop.
Suppressing/Disable/Hide JavaScript Errors and logging them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onerror = function myErrorFunction(message, url, linenumber) { | |
if(console != undefined){ | |
console.log('Error: '+ message + ' Of: ' + url + ' At: line: ' + linenumber) | |
} | |
// I want to keep silent | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment