Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.16.15 Ndb::getNdbError()

Description.  This method provides you with two different ways to obtain an NdbError object representing an error condition. For more detailed information about error handling in the NDB API, see NDB Cluster API Errors.

Signature.  The getNdbError() method actually has two variants.

The first of these simply gets the most recent error to have occurred:

const NdbError& getNdbError
    (
      void
    )

The second variant returns the error corresponding to a given error code:

const NdbError& getNdbError
    (
      int errorCode
    )

Regardless of which version of the method is used, the NdbError object returned persists until the next NDB API method is invoked.

Parameters.  To obtain the most recent error, simply call getNdbError() without any parameters. To obtain the error matching a specific errorCode, invoke the method passing the code (an int) to it as a parameter. For a listing of NDB API error codes and corresponding error messages, see Section 2.4, “NDB API Errors and Error Handling”.

Return value.  An NdbError object containing information about the error, including its type and, where applicable, contextual information as to how the error arose. See Section 2.3.20, “The NdbError Structure”, for details.


User Comments
Sign Up Login You must be logged in to post a comment.