Programmer's Guide > Using the AOM > Using JScript to Access the AOM > JScript Exception Handling
  
JScript Exception Handling
JScript provides exception handling with try/catch statements. JScript is implemented using the COM interface, so it does not support the DOM and AOM exception classes. All exceptions are mapped to the JScript Error global object. The COM error code values listed in COM Error Handling are available using the number property of the Error object. The message associated with the exception is available using the description property. For example:
try {
doc.insertBefore(doc, doc); // this is invalid
}
catch(e) {
Application.alert("Error: " + (e.number&0xffff) +
" Description: " + e.description);
}