User Tools

Site Tools


throw_process_specified_error_.htm
Navigation:  ABC Library Reference > ErrorClass > ErrorClass Methods >====== Throw (process specified error) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Throw( error id ), PROC

blk2blue.jpg

Throw Processes the specified error then returns its severity level.
error id An integer constant, variable, EQUATE, or expression that indicates which error to process.

The Throw method processes the specified error by calling other ErrorClass methods, then returns its severity level.

Typically, Throw is the method your program calls when it encounters a known error. That is, as your program encounters errors or other notable conditions, it simply calls the Throw method or one of its variations (ThrowFile or ThrowMessage), passing it the appropriate error id. Throw then calls any other ErrorClass methods required to handle the specified error.

Implementation:

The Throw method saves the error state (ERROR, ERRORCODE, FILEERROR, and FILEERRORCODE), locates the specified error, calls the appropriate method to handle the error according to its severity level, then returns the severity level.

The ABERROR.INC file contains a list of default symbolic constants for the error id parameter.

NoteBox.jpg

The Throw method may or may not RETURN to your calling program, depending on the severity of the error.

Return Data Type:     BYTE

Example:

!user level error occurred. ask user to confirm

Severity = GlobalErrors.Throw(Msg:ConfirmCancel) !handle the error condition

IF Severity = Level:Cancel

 LocalResponse = RequestCancelled

 DO ProcedureReturn

END

See Also:     Errors, ThrowFile, ThrowMessage

throw_process_specified_error_.htm.txt · Last modified: by 127.0.0.1