Programmer's Guide > Using the AOM > Using VBScript to Access the AOM > VBScript Error Handling
  
VBScript Error Handling
VBScript does not support exceptions, so the DOM and AOM exception classes are not available. All exceptions are mapped to the VBScript Err global object. The COM error code values listed in COM Error Handling are available using the Number property of the Err object. The message associated with the exception is available using the Description property. For example:
On Error Resume Next
doc.insertBefore doc, doc ' this is invalid
If Err.Number <> 0 Then
Application.alert("Error: " & Err.Number _
& " Description: " & Err.Description)
Err.Clear
End if