try {
comment = "adding two numbers";
var a = 2+2;
comment = "saying hello";
var hello ="hello";
alert(hallo);
} catch (e) { alert("while "+comment+": "+e.description); }
var reportStatus = new Array();
function report ( msg ) {
reportStatus.push ( msg );
}
function showReport ( ) {
alert ( reportStatus.join ( "\n" ) );
}
window.onerror = function ( err, url, line ) {
report ( err + " [" + url + " - line " + line + "]" );
showReport();
}
-- MattWalsh - 03 Sep 2006