User Tools

Site Tools


throwfile_set_value_of_file_then_process_error_.htm
Navigation:  ABC Library Reference > ErrorClass > ErrorClass Methods >====== ThrowFile (set value of %File, then process error) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

ThrowFile( error id, filename ), PROC

blk2blue.jpg

ThrowFile Sets the substitution value of %File, then processes the error.
error id An integer constant, variable, EQUATE, or expression that indicates which error to process.
filename A string constant, variable, EQUATE, or expression that indicates which file produced the error.

The ThrowFile method sets the substitution value of %File, then processes the error, and finally returns the severity level of the error.

ThrowFile combines the functionality of SetFile and Throw into a single method.

Implementation:

The ABERROR.INC file contains a list of default symbolic constants for the error id parameter. The value of the ErrorClass.FileName property is substituted for any %File symbols in the error message text.

NoteBox.jpg

The ThrowFile 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.ThrowFile(Msg:OpenFailed, NAME(MyFile))

END

See Also:     FileName, SetFile, Throw

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