sdaiGetErrorHandler
Returns the current defined _EDMinterface_ error handler function. An _EDMinterface_ error handler is a function that will be invoked each time the EDMinterface detects an error during operation. An _EDMinterface_ error handler is defined by the sdaiSetErrorHandler function. Only one _EDMinterface_ error handler can be defined at the same time, hence the returned error handler is the result of the latest performed sdaiSetErrorHandler operation.
No _EDMinterface_ error handler exists for the calling application before the first invocation of the sdaiSetErrorHandler function. An _EDMinterface_ error handler is local to the calling application.
Related function: sdaiSetErrorHandler
Header:
#include "sdai.h"
Prototype:
SdaiErrorHandler sdaiGetErrorHandler(void);
Arguments:
None.
Returns:
SdaiErrorHandler that is the address of the function that defines the current _EDMinterface_ error handler. NULL is returned when no _EDMinterface_ error handler is defined for the calling application.
Example:
SdaiErrorHandler errHandler;
...
errHandler = sdaiGetErrorHandler(); /* save current error handler */
sdaiSetErrorHandler("mySdaiErorHandler"); /* set new error handler */
. . .
sdaiSetErrorHandler(newErrHandler); /* reset to original error handler */
. . .