Jump to Real's How-to Main page

Have your own error message

<SCRIPT>

window.onerror = handleErrors; // or null to suppress error message
function handleErrors(msg, url, line)
{
    var errorString  = "JavaScript Error Report\n";
        errorString += "Message: "+msg+"\n";
        errorString += "Url: "+url+"\n";
        errorString += "Line: "+line;
    java.lang.System.out.println(errorString);
    return true;
}
</SCRIPT>

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]