This method provides an easy and safe way to access any extra
information about an error. Rather than reading these extra
details from the
details property (now now
deprecated in favor of
getNdbErrorDetail()‐see Bug #48851).
This method enables storage of such details in a user-supplied
buffer, returning a pointer to the beginning of this buffer. In
the event that the string containing the details exceeds the
length of the buffer, it is truncated to fit.
getErrorDetail() provides the source of an
error in the form of a string. In the case of a unique constraint
violation (error 893), this string supplies the fully qualified
name of the index where the problem originated, in the format
NdbError.details, on the other hand, supplies
only an index ID, and it is often not readily apparent to which
table this index belongs.) Regardless of the type of error and
details concerning this error, the string retrieved by
getErrorDetail() is always null-terminated.
getNdbErrorDetail() method has the
const char* getNdbErrorDetail ( const NdbError& error, char* buffer, Uint32 bufferLength ) const
To obtain detailed information about an error, call
getNdbErrorDetail() with a reference to the
buffer, and the length of this
buffer (expressed as an unsigned 32-bit integer).
When extra details about the
are available, this method returns a pointer to the beginning of
buffer supplied. As stated
previously, if the string containing the details is longer than
bufferLength, the string is truncated
to fit. In the event that no addition details are available,