LINENO( ) Function Example

The following example is part of a simple error-handling routine.

ON ERROR DO bug_proc WITH LINENO( )
BRWS  && Causes an error
ON ERROR

*** Bug_Proc error handler ***

PROCEDURE bug_proc
PARAMETERS gnBadLine
WAIT WINDOW 'Error occurred at line: ' + ALLTRIM(STR(gnBadLine))
RETURN