User Tools

Site Tools


takenotify_process_notify_error_.htm
Navigation:  ABC Library Reference > ErrorClass > ErrorClass Methods >====== TakeNotify (process notify error) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

TakeNotify, PROTECTED, VIRTUAL

blk2blue.jpg

The TakeNotify method is called when an error with Level:Notify is “Thrown” to the ErrorClass (see Throw, ThrowFile, ThrowMessage).

Implementation:

The base class method (ErrorClass.TakeNotify) displays the error message and returns nothing. Note however, that the various “Throw” methods return Level:Benign (via the TakeError method) when a Level:Notify error is “Thrown.”

Example:

 INCLUDE('ABERROR.INC')        !declare ErrorClass

MyErrorClass CLASS(ErrorClass)  !declare derived class

TakeNotify   PROCEDURE,VIRTUAL  !prototype corresponding virtual

       END

GlobalErrors MyErrorClass       !declare GlobalErrors object

CODE

GlobalErrors.Init              !GlobalErrors initialization

!program code

GlobalErrors.Throw(Msg:CreateFailed) !Throw method calls SELF.TakeNotify to

                   !automatically call the derived class method

                   !rather than the base class method

!program code

MyErrorClass.TakeNotify PROCEDURE!derived class virtual to handle notify errors

CODE

!your custom code here

RETURN

See Also:     TakeError, Throw, ThrowFile, ThrowMessage

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