Err
Err.Number
Err.Description
Err.Source
Err.Clear
Err.Raise
Description
The Err object is used to manage run-time errors. The Err object is always available while a program is running. There is no need to use ADDOBJECT. When an error occurs, the Number, Description, and Source properties are set in the Err object. Once an error has been handled, the Clear method resets the Err object, removing any error data from its properties. The Raise method can be used to generate an error event.
Example
REM Err Object Example
'Err object manages run-time errors
DO_DIV0(3)
SUB DO_DIV0(Num)
ON ERROR RESUME NEXT
PRINT Num / 0
IF Err THEN
PRINT Err.Number, Err.Description
Err.Clear
END IF
END SUB
Output
11 Division by zero
Related Items
ON ERROR