Abstract
This section discusses the NdbError
data
structure, which contains status and other information about
errors, including error codes, classifications, and messages.
Description.
An NdbError
consists of six parts, of which one
is deprecated as of MySQL Cluster NDB 6.2.19, MySQL Cluster NDB
6.3.29, and MySQL Cluster NDB 7.0.10:
Error status: This describes the impact of an error on the application, and reflects what the application should do when the error is encountered.
The error status is described by a value of the
Status
type. See
Section 2.3.31.1.1, “The NdbError::Status
Type”, for possible
Status
values and how they should be
interpreted.
Error classification: This represents a logical error type or grouping.
The error classification is described by a value of the
Classification
type. See
Section 2.3.31.1.2, “The NdbError::Classification
Type”, for possible
classifications and their interpretation. Additional
information is provided in
Section 5.2.3, “NDB Error Classifications”.
Error code: This is an NDB API internal error code which uniquely identifies the error.
It is not recommended to write application programs which are dependent on specific error codes. Instead, applications should check error status and classification. More information about errors can also be obtained by checking error messages and (when available) error detail messages. However — like error codes — these error messages and error detail messages are subject to change.
A listing of current error codes, broken down by
classification, is provided in
Section 5.2.2, “NDB Error Codes and Messages”. This listing will be
updated periodically, or you can check the file
storage/ndb/src/ndbapi/ndberror.c
in
the MySQL 5.1 sources.
MySQL Error code: This is the corresponding MySQL Server error code. MySQL error codes are not discussed in this document; please see Server Error Codes and Messages, in the MySQL Manual, for information about these.
Error message: This is a generic, context-independent description of the error.
Error details: This can often provide additional information (not found in the error message) about an error, specific to the circumstances under which the error is encountered. However, it is not available in all cases.
Where not specified, the error detail message is
NULL
.
This property is deprecated as of MySQL Cluster NDB
6.2.19, MySQL Cluster NDB 6.3.29, and MySQL Cluster NDB
7.0.10. Beginning with these MySQL Cluster releases, for
obtaining error details, you should use the
Ndb::getNdbErrorDetail()
method
instead. See Section 2.3.8.1.16, “Ndb::getNdbErrorDetail()
”,
for more information.
Specific NDB API error codes, messages, and detail messages are subject to change without notice.
Definition. The NdbError structure contains the following members, whose types are as shown here:
Status status
The error status.
Classification classification
The error type (classification).
int code
The NDB API error code.
int mysql_code
The MySQL error code.
const char* message
The error message.
char* details
The error detail message.
details
is deprecated as of MySQL Cluster
NDB 6.2.19, MySQL Cluster NDB 6.3.29, and MySQL Cluster NDB
7.0.10. Beginning with these MySQL Cluster releases, for
obtaining error details, you should use the
Ndb::getNdbErrorDetail()
method instead.
See Section 2.3.8.1.16, “Ndb::getNdbErrorDetail()
”, for more
information. (Bug#48851)
See the Description for more information about these members and their types.
Types.
NdbError
defines two datatypes:
Status
: The error status. See
Section 2.3.31.1.1, “The NdbError::Status
Type”.
Classification
: The type of error or the
logical grouping to which it belongs. See
Section 2.3.31.1.2, “The NdbError::Classification
Type”.
Structure Diagram.
This diagram shows all the available members and types of the
NdbError
structure: