The mi_error_desc_next() function
The mi_error_desc_next() function gets the next error descriptor from the list of current exceptions that are associated with the current SQL statement.
Syntax
MI_ERROR_DESC *mi_error_desc_next(err_desc)
MI_ERROR_DESC *err_desc;
- err_desc
- A pointer to the current error descriptor in the list of current
exceptions. The mi_error_desc_next() function returns the error
descriptor that follows this err_desc descriptor.
Valid in client LIBMI application? Valid in user-defined routine? No Yes
Usage
The mi_error_desc_next() returns the next error descriptor from the exception list of which err_desc is part. The exception list contains the error descriptors for situations that generate multiple exceptions. Normally, an exception callback is called once for each exception. However, if a situation generates multiple exceptions, you probably do not want the callback to be invoked for each exception. The callback can use the mi_error_desc_next() function to obtain the details of an exception and to prevent the callback from being called again for that exception.
Return values
- An MI_ERROR_DESC pointer
- A pointer to the error descriptor for the next exception in the exception list.
- NULL
- The function was not successful or no more error descriptors exist.