jband%netscape.com 948f6f521c (not part of client build) initial checkin of mozilla/js/jsdj (migrated from ns/js/jsdj)
git-svn-id: svn://10.0.0.236/trunk@10115 18797224-902f-48f8-a5cc-f745e15eee43
1998-09-16 02:07:50 +00:00

47 lines
892 B
HTML

<html>
<head>
<title>Runtime Error Sample</title>
</head>
<body>
<!--
This demonstrates catching runtime errors in
the debugger and the fact that, while it is
not possible to continue from the error,
the various varibles in the call chain
are alive and can be independently inspected
after pressing the "debug" button in the
debugger's error reporter dialog.
-->
<script language="JavaScript">
function HasError()
{
var local = 4;
return bogus; // this is an intentional runtime error
}
function CallFunWithError()
{
var local = 3;
return HasError();
}
function CallFunThatCallsFunWithError()
{
var local = 2;
return CallFunWithError();
}
var local = 1; // not really local :)
document.writeln( "Errors on purpose (run me in the JavaScript Debugger!)" + "<BR>");
CallFunThatCallsFunWithError();
</script>
</body>
</html>