throwmessage_set_value_of_message_then_process_error_.htm
Navigation: ABC Library Reference > ErrorClass > ErrorClass Methods >====== ThrowMessage (set value of %Message, then process error) ====== | |
ThrowMessage( error id, messagetext), PROC
ThrowMessage | Sets the substitution value of the %Message macro, then processes the error. |
error id | An integer constant, variable, EQUATE, or expression that indicates which error to process. |
messagetext | A string constant, variable, EQUATE, or expression to replace any %Message symbols in the message text. |
The ThrowMessage method sets the substitution value of the %Message macro, then processes the error, and finally returns the severity level of the error.
Implementation:
The ABERROR.INC file contains a list of default symbolic constants for the error id parameter. The value of the ErrorClass.MessageText property is substituted for any %Message symbols in the error message text.
The ThrowMessage method may or may not RETURN to your calling program, depending on the severity of the error.
Return Data Type: BYTE
Example:
OPEN(MyFile)
IF ERRORCODE()
Severity = GlobalErrors.ThrowMessage(Msg:OpenFailed, NAME(MyFile))
END
See Also: MessageText, Throw
throwmessage_set_value_of_message_then_process_error_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1