User Tools

Site Tools


init_initialize_the_errorclass_object_.htm
Navigation:  ABC Library Reference > ErrorClass > ErrorClass Methods >====== Init (initialize the ErrorClass object) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page
Init
Init(errorlog), VIRTUAL

blk2blue.jpg

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

init_initialize_the_errorclass_object_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1