[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _errNew()
 Create a new Error object
------------------------------------------------------------------------------
 C Prototype

     #include "error.api"
     ERRORP _errNew(void)

 Returns

     _errNew() returns a pointer to a new Error object.

 Description

     _errNew() creates an empty Error object and returns a pointer to it.
     You may modify the variables within the object using the "_errPut"
     functions and inspect them using the "_errGet" functions.  You may,
     then, send the object to the CA-Clipper error handler.

     The values of the variables in the Error object created by _errNew() are
     compatible with the instance variables in CA-Clipper Error objects.
     This allows the use of the constants in the Error.ch include file.

     Proper error handling is the responsibility of the subsystem programmer.
     The CA-Clipper API systems provide low-level services and normally
     provide only simple return values indicating success or failure.  The
     exception is the _fsExtOpen() function from the File System API
     (demonstrated in the Usage Example at the end of this chapter), which can
     assign values to an Error object.

     Note:  When it is no longer required, release all memory allocated
     by the Error object using _errRelease().

 Examples

     .  This code fragment demonstrates how to create an Error object:

        #include "error.api"
           .
           .
           .
           ERRORP pError;

           pError = _errNew();
           .
           .
           .

           _errRelease( pError );

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


See Also: _errLaunch() _errRelease()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson