- a developer's blog

Hiding Javascript Errors from Displaying in the Browser

While there are no excuses for a buggy code in our websites, sometimes error do creep in.
To avoid this from displaying in your browser console, you can use a java script code like this:

function HideErrorMessages() {
return true;
window.onerror = HideErrorMessages;

This will hide any error notice from your website visitors.
Let me know what you think :)