Navigation: ABC Library Reference > ErrorClass > ErrorClass Methods >====== TakeError (process specified error) ====== | |
TakeError( error id ), PROC
TakeError | Locates the specified error, calls the appropriate method to handle it, then returns the severity level. |
error id | An integer constant, variable, EQUATE, or expression that indicates which error to process. |
The TakeError method locates the specified error, then based on its severity level calls the appropriate (TakeLevel) method to process the error, then returns the severity level.
TakeError assumes SetErrors has already been called to save the current error state.
Implementation:
The ABERROR.INC file contains a list of default symbolic constants for the error id parameter.
By default, the error manager recognizes six different levels of error severity. The TakeError method calls a different virtual method (TakeLevel) for each severity level, which makes it easy to override the default error actions with your own application-specific error actions. The recognized severity EQUATEs are declared in ABERROR.INC. These severity levels and their default actions are:
Level:Benign | no action, returns Level:Benign | |
Level:User | displays message, returns Level:Benign or Level:Cancel | |
Level:Notify | displays message, returns Level:Benign | |
Level:Fatal | displays message, halts the program | |
Level:Program | treated as Level:Fatal | |
any other value | treated as Level:Program |
Return Data Type: BYTE
See Also: Errors, SetErrors, TakeBenign, TakeNotify, TakeUser, TakeFatal, TakeProgram, TakeOther, Throw