Error |
Description
Returns an Error object containing detailed information about the last error that occurred. Read-only.
PowerBASIC Syntax
Remarks
The returned Error object is used for both compilation and run-time errors.
Note Not all Error object properties are valid at all times. When a property is not appropriate for a specific error, its value will be 0 or a zero-length string ("").
Example [PowerBASIC]
#INCLUDE "MSSCRIPT.INC"
DIM pSc AS IScriptControl DIM pError AS IScriptError DIM lErrorNumber AS LONG DIM strErrorSource AS STRING DIM strErrorDescription AS STRING DIM strErrorHelpFile AS STRING DIM lErrorHelpContext AS LONG DIM strErrorText AS STRING DIM lErrorLine AS LONG DIM lErrorColumn AS LONG
' Create an instance of the Microsoft Script Control pSc = NEWCOM "MSScriptControl.ScriptControl"
...
' Get a reference to the Error interface pError = pSc.Error lErrorNumber = pError.Number strErrorSource = ACODE$(pError.Source) strErrorDescription = ACODE$(pError.Description) strErrorText = ACODE$(pError.Text) lErrorLine = pError.Line lErrorColumn = pError.Column
...
' Clears all errors pSc.Clear
|