ErrorFile()
Syntax
Result$ = ErrorFile()Description
Returns the filename of the sourcecode or includefile where the current error occured. This command only returns a meaningful value if there was an error handled by OnErrorCall() or OnErrorGoto().
The tracking of line numbers needs to be enabled on compilation for this command to return the actual file name. To enable this feature, enable the "Enable OnError lines support" checkbox in the compiler options or specify the /LINENUMBERING (Windows) or --linenumbering (Linux, Mac OSX) commandline switch when compiling from the commandline.
Return value
Returns the filename of the error, or "OnError line support disabled" if the OnError lines support is disabled. (A simple way to check if the OnError lines support is enabled is to check if the result of ErrorLine() is not -1.)
Supported OS
All