Error handling functions
Error handling API for a database. All the fuctions here are located in RDM DB Engine Library. Linker option: More...
Collaboration diagram for Error handling functions:
Functions |
|
RDM_RETCODE | rdm_dbSetErrorHandler (RDM_DB db, RDM_ERROR_FCN errorFunction, void *userData) |
Replace default error reporting with a custom function. More... | |
Detailed Description
Error handling API for a database. All the fuctions here are located in RDM DB Engine Library. Linker option:
-l
rdmrdm
Function Documentation
rdm_dbSetErrorHandler()
RDM_RETCODE rdm_dbSetErrorHandler | ( | RDM_DB | db, |
RDM_ERROR_FCN | errorFunction, | ||
void * | userData | ||
) |
#include <rdmdbapi.h>
Replace default error reporting with a custom function.
This function accepts a pointer to a function that will be called when RDM detects an error. The provided function supersedes the internal errorFunction function. The error reporting function must be a void function with the correct prototype, as shown below.
In the function prototype
- The RDM_RETCODE is the error code as defined in RDM header files
- The character pointer points to the error message
- The RDM_DB pointer will be the db where the error occurred
- The void pointer is the same pointer which was passed to rdm_dbSetErrorHandler() function, allowing the error reporting function to retrieve more information if it is called.
- Locking Requirements
- None
- Return values
-
sOKAY Normal, successful return.
- Parameters
-
[in] db [in] A valid RDM database handle [in] errorFunction [in] The custom function that will be called when RDM detects an error condition [in] userData [in] An option pointer to a buffer that will be passed into the error handler when it is called