Previous Topic

Next Topic

Error Handling

Most c-treeDB API functions return an error status to indicate if a particular function operation succeeded or not. Most c-treeDB API methods will also keep the last error status, if the function operation failed. The last error status can be manipulated with the following methods:

GetError() retrieves the last error status. If a function succeeds, the success status is not kept by the c-treeDB API.

SetError() sets the last error status, overwriting any previous error status kept by the c-treeDB API.

ClearError() clears the last error status.

// clear the error if error is INOT_ERR
// Recobj is a CTRecord object
if (Recobj.GetError() == INOT_ERR)
{
   Recobj.ClearError();
}