Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Technical Reference - <b>_errlaunch()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _errLaunch()
 Launch the CA-Clipper Error Handler
------------------------------------------------------------------------------
 C Prototype

     #include "error.api"
     ERRCODE _errLaunch(
                         ERRORP pError
                       )

 Arguments

     pError is a pointer to a properly created and completed Error
     object.

 Returns

     _errLaunch() returns an error code indicating the action to take, or
     zero if no error occurred..

 Description

     _errLaunch() invokes the CA-Clipper Error Handler using pError as an
     argument.  This function handles errors that can default or retry (see
     _errPutFlags()).

     The following table shows several manifest constants defined in
     Error.api that you may use to test the return value of this function.
     The error code returned indicates the value returned by the Error
     Handler.  You should return an error code from each function in the
     subsystem so that you may test for an error after the function returns.

     _errLaunch() Return Values
     ------------------------------------------------------------------------
     Constant     Value     Meaning/Action
     ------------------------------------------------------------------------
     E_BREAK        FFFFh    Error Handler issued a BREAK command or BREAK()
                             function. Clean up and exit immediately.
     E_RETRY        1        Retry operation (occurs only if you specify
                             EF_CANRETRY flag).   Retry the failed operation
                             and increment the value of tries.
     E_DEFAULT      0        Ignore failure (occurs only if you specify
                             EF_CANDEFAULT  flag).  Ignore the failure,
                             taking whatever default action is required
                             for the subsystem to continue.
     ------------------------------------------------------------------------

     Notice that E_DEFAULT is the same as the value for success (zero).
     E_DEFAULT means, literally, to pretend nothing happened and, therefore,
     the calling routine has no need to distinguish between E_DEFAULT and
     success.  The most common use you will find for E_DEFAULT is to handle
     warnings.  Never use E_DEFAULT if the error will affect the operation of
     any other part of the subsystem.

 Examples

     .  This code fragment demonstrates launching an error and
        returning the error code to the calling function:

        #include "error.api"

           .
           .   <an error occurs>
           .
           ERRORP pError;
           ERRCODE uiErrCode;

           pError = _errNew();
           .
           .   <put values in error>
           .
           uiErrCode = _errLaunch( pError );
           _errRelease( pError );

           return ( uiErrCode );

 Files:  Library is CLIPPER.LIB, header file is Error.api.


See Also: _errNew() _errPutFlags() _errPutTries() _errRelease()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson