Skip to content

Instantly share code, notes, and snippets.

@charleslouis
Created March 28, 2013 09:26
Show Gist options
  • Save charleslouis/5261901 to your computer and use it in GitHub Desktop.
Save charleslouis/5261901 to your computer and use it in GitHub Desktop.
Credits to Andy langton. http://andylangton.co.uk/articles/javascript/disable-javascript-errors/ This simple script will prevent javascript errors from being displayed in your visitor's browser. The functionality is very simple: create a function that always returns true, and then whenever an error occurs, call this function (returning true and …
// Credits to Andy langton
// http://andylangton.co.uk/articles/javascript/disable-javascript-errors/ This simple script will prevent javascript errors from being displayed in your visitor's browser. The functionality is very simple: create a function that always returns true, and then whenever an error occurs, call this function (returning true and suppressing the error).
function noError(){return true;}
window.onerror = noError;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment