[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NEW:      ERRORINHANDLER()
------------------------------------------------------------------------------

     ERRORINHANDLER() is a new function that assures a clean and prompt exit
     from within an application.  It produces an "Error recovery failure"
     error and indicates the name of the current module as well as the line
     number.

     Use this function to indicate that an error condition has occurred
     within an error handler.

     The following examples illustrate the use of ERRORINHANDLER().  An
     invalid return value is trapped and reported by the handler:

     oErr:canRetry := .T.
     oErr:canDefault := .T.
     xValue := EVAL(ERRORBLOCK(), oErr)

     // If they request anything other than retry (.T.)
     // or default (.F.), exit with error

     IF VALTYPE(xValue) != "L"
        ERRORINHANDLER()
     ENDIF

     A recursive activation of the error handler has been detected:

     FUNCTION MyErrHandler( oErr )

     STATIC lDejaVu := .F.

        IF (lDejaVu)
           ERRORINHANDLER()
        ENDIF

     lDejaVu := .T.
        <error handling code>
     lDejaVu := .F.

     RETURN


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson