This tip was submitted to the SearchDomino.com tip library by member Hemang Kapadia. Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.
With this JavaScript code, you'll be able to create a customized JavaScript error handler that will show a pop-up of the error details. This will replace the default error message at the bottom left of the Web browser.
<script>
function customHandler(desc,page,line,chr) { alert(
'JavaScript error occurred! n'
+'While every effort was made to test this site in a
variety of browsers on a variety of platforms,
it seems something still went wrong. Browsers that have
been tested include Microsoft Internet Explorer 6+ n '
+'nError description: t'+desc
+'nPage address: t'+page
+'nLine number: t'+line
)
return true
}
window.onerror = customHandler;
</script>
Do you have comments on this tip? Let us know.