ErrorLine()

Syntax

Result = ErrorLine()
Description
Returns the line number in the sourcecode 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 line number. 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 line number of the error, or -1 if the OnError lines support is disabled.

Supported OS

All

<- ErrorFile() - OnError Index - ErrorMessage() ->