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
Chapter 5, NDB 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 5.2, “NDB API Error Messages”.
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 4.29, “The NdbError Structure”, for details.

