Init (initialize the ErrorClass object)

Top  Previous  Next

 

Init

 

Init(errorlog), VIRTUAL

Init

Initialize the ErrorClass object.

errorlog

The label of the ErrorLogInterface.

The Init method initializes the ErrorClass object and adds the default errors.

Implementation:

Creates the Errors property and calls the AddErrors method to initialize it with the default errors defined in ABERROR.TRN. Default error ID EQUATEs are defined in ABERROR.INC.

The standard templates instantiate a single global ErrorClass object and make a single global call to Init. However, you may wish to instantiate an ErrorClass object with a separate set of errors for each base class, or for any other logical entity (for example a PayrollErrors object for the Payroll segment of your program).

Example:

GlobalErrors ErrorClass  !declare GlobalErrors object

CODE

GlobalErrors.Init        !GlobalErrors initialization

Main                     !call main procedure

GlobalErrors.Kill        !GlobalErrors termination

 

See Also:     AddErrors, Errors, Kill