| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ErrorClass > ErrorClass Methods >====== ThrowFile (set value of %File, then process error) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[throw process specified error .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[throwmessage set value of message then process error .htm|{{btn_next_n.gif|Next page}}]] | | || **ThrowFile(**// error id, filename //**), PROC** {{blk2blue.jpg|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|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 file that produced the error .htm|FileName]], [[setfile set the substitution value of the file macro .htm|SetFile]], [[throw process specified error .htm|Throw]]