ERL


Error handling function to return the line where the error occurred

Syntax:
Usage:
result = Erl

Return Value:
An long return value containing the line number where the last error occurred.

Description:
Erl will return the line number where the last error occurred. If no error has occurred, Erl will return 0.

Erl cannot always be used effectively -- QB-like error handling must be enabled.

Erl is reset by RESUME and RESUME NEXT

Examples:
' compile with -lang fblite or qb

#lang "fblite"

' note: compilation with '-ex' option is required

On Error Goto ErrorHandler

' Generate an explicit error
Error 100

End

ErrorHandler:
  Dim num As Long = Err
  Print "Error "; num; " on line "; Erl
  Resume Next

' Expected output is
' Error  100 on line  6

Differences from QB:
See also:
Back to Error Handling Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode