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>_errputflags()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _errPutFlags()
 Set the value of the error type flags
------------------------------------------------------------------------------
 C Prototype

     #include "error.api"
     ERRORP _errPutFlags(
                          ERRORP pError,
                          USHORT uiFlags
                        )

 Arguments

     pError is a pointer to the Error object that is to be set.

     uiFlags contains a value indicating the allowable actions for this
     error.

 Returns

     _errPutFlags() returns a pointer to the Error object (self).

 Description

     _errPutFlags() assigns a value to flags to specify the actions that are
     allowed for this error. You, as the subsystem designer, are responsible
     for determining what actions are permissible, and the following general
     guidelines should help.

     If an error can be rectified by the user, you should allow a retry.  For
     example, if a file open error occurs because the device is not be ready
     (such as an open floppy drive door), the user can correct the problem
     and retry the error.

     If the error is caused by something that cannot be remedied by the user,
     you will gain nothing by allowing a retry.

     If the error will not cause a failure in other parts of the system, such
     as the failure to set a screen color, you may safely ignore the error
     (the default behavior).

     You may also ignore the error if there is a valid alternative to the
     routine that failed.  For example, if a routine results in an error
     because of failure to retrieve an environment variable that holds the
     user's name, you can execute a function to retrieve the name from the
     user before returning to the calling routine (which would have no idea
     that an error even occurred).

     The value and meaning of the error type flags defined in Error.api are
     as follows:

     Error flags Values
     ------------------------------------------------------------------------
     Constant     Value     Meaning
     ------------------------------------------------------------------------
     EF_CANRETRY    1       Advises the CA-Clipper Error Handler routine that
                            the failed operation can be retried.
     EF_CANDEFAULT  4       Advises the CA-Clipper Error Handler routine that
                            the failed operation can be safely ignored.
     ------------------------------------------------------------------------

     Warning!  The most common use you will find for EF_CANDEFAULT is to
     handle warnings.  Never use EF_CANDEFAULT if the error will affect the
     operation of any other part of the subsystem.

 Examples

     .  This code fragment shows the setting of flags:

        #include "error.api"
           .
           .
           .
           _errPutFlags( pError, EF_CANRETRY );
           uiErrCode = _errLaunch( pError );
           .
           .
           .

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


See Also: _errGetFlags() _errLaunch() _errPutGenCode()

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