ErrorClass Functional Organization - Expected Use 

Top  Previous  Next

As an aid to understanding the ErrorClass, it is useful to organize the various ErrorClass methods into two large categories according to their expected use--the primary interface and the virtual methods. This organization reflects what we believe is typical use of the ErrorClass methods.

Non-Virtual Methods

The Non-Virtual Methods, which you are likely to call fairly routinely from your program, can be further divided into three categories:

Housekeeping (one-time) Use:

 

Init

initialize the ErrorClass object

 

AddErrors

add or override recognized error definitions

 

SetFatality

change the severity level of a specific error

 

Kill

terminate the ErrorClass object

Mainstream Use:

 

Throw

process an error

 

ThrowFile

set substitution value of %File then process an error

 

ThrowMessage

set substitution value of %Message then process an error

 

Message

display an error message from the Errors list

Occasional Use:

 

SetField

set the substitution value of the %Field macro

 

SetFile

set the substitution value of the %File macro

 

SetErrors

save the current error state

 

SetId

make a selected error the current one

 

RemoveErrors

remove (and/or restore) error definitions

 

TakeError

process an error, assuming SetErrors has been called

 

Virtual Methods

Typically, you will not call these methods directly--the Non-Virtual Methods call them. We anticipate you will want to override these methods, and because they are virtual, they are very easy to override. However they do provide reasonable default behavior in case you do not want to override them. These methods are listed functionally rather than alphabetically.

 

TakeBenign

process benign errors

 

TakeNotify

process notify errors

 

TakeUser

process user errors

 

TakeFatal

process fatal errors

 

TakeProgram

process program errors

 

TakeOther

process any other errors