Navigation: ABC Library Reference > ErrorClass > ErrorClass Methods >====== TakeNotify (process notify error) ====== | |
TakeNotify, PROTECTED, VIRTUAL
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