|
APGError Object |
|
See Also: |
The APGError.Number property returns the COM error code for the error.
VBScript:
JScript:
| oAPGError | An APGError object. |
| nErr | The integer COM error code. If no error has occurred, this number is 0. Error numbers may be positive or negative integers. |
If no error has occurred, 0 is returned.
This error code is often most meaningful when viewed in hex:
' Retrieve the error object from a script that was executed
Dim oAPGError, nErr
Set oAPGError = oScript.GetLastError()
' Retrieve the error number
nErr = oAPGError.Number
' If an error occurred, display it in a Message Box
If (nErr <> 0) Then
MsgBox "Error occurred: 0x" & Hex(nErr)
End If