Result$ = ErrorFile()
Returns the filename of the source code or includefile where the current error occurred. 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) command-line switch when compiling from the command-line.



Return value

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


<- ErrorCode() - OnError Index - ErrorLine() ->