User Tools

Site Tools


setfile_set_the_substitution_value_of_the_file_macro_.htm
Navigation:  ABC Library Reference > ErrorClass > ErrorClass Methods >====== SetFile (set the substitution value of the %File macro) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetFile(// filename //)

blk2blue.jpg

SetFile Sets the substitution value of the %File macro.
filename A string constant, variable, EQUATE, or expression that indicates which file produced the error.

The **SetFile **method sets the substitution value of the %File macro. This value replaces any %File symbols within the error message text.

The ThrowFile method sets the %File macro before processing the specified error. That is, ThrowFile combines the functionality of SetFile and Throw into a single method.

**Implementation: **Assigns the //filename //parameter to the ErrorClass.FileName property.

Example:

** CREATE(MyFile)**

** IF ERRORCODE()                        !if error occurred**

**  GlobalErrors.SetFile(NAME(MyFile))   !set file that failed**

**  GlobalErrors.Throw(Msg:CreateFailed) !process the error**

** END**

 

See Also:     FileName, ThrowFile

setfile_set_the_substitution_value_of_the_file_macro_.htm.txt · Last modified: by 127.0.0.1