ErrorLine()

Syntax

Result = ErrorLine()
Description
Returns the line number in the source code 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 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) command-line switch when compiling from the command-line.

Parameters

None.

Return value

The line number of the error, or -1 if the OnError lines support is disabled.

Supported OS

All

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