You are viewing this page out of context. To see it in the context it is intended please click here.
About This Page
Reply posted by David Schmidt on Mon 26 Jan 2004 in response to Debugging JavaScript in Your Applications
JScript error handling
JScript error handling.Table of JScript errors:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/j
s56jslrfjscripterrorstoc.asp
<html>
<head>
<script>
<!--
function throwerror(){
try{
//Generate error
a=b;
}catch(e){
errorobj=e;
errornr=(e.number & 0xFFFF);
errordesc=e.description;
//Display an alert
alert(e+'\n'+errornr+'\n'+errordesc);
/*Redirect to a form that uses Query_String to get the error number
and then use that number as a key for DbLookUp to get the
description from a document containing further information about the
error. Then create an entry in your error handling database*/
window.location.href='$$ReturnGeneralError?OpenForm&errornr='+errornr;
}
}
// -->
</script>
</head>
<body text="#000000" bgcolor="#FFFFFF">
<button onclick="throwerror()">Throw Error</button>
</body>
</html>