ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data
Prototype
ADMXRC2_STATUS ADMXRC2_InstallErrorHandler( ADMXRC2_ERROR_HANDLER Routine)
Arguments
Argument | Type | Purpose |
Routine | In | The error handler routine to install |
Return value
Value | Meaning |
ADMXRC2_SUCCESS | The error handler routine was successfully installed |
Description
This function is used to install a user-defined error handler function that will be called whenever the ADM-XRC function must return an error condition. The error handler function should be of type ADMXRC2_ERROR_HANDLER:
void MyErrorHandler( const char* FunctionName, ADMXRC2_STATUS Code);
If Routine is non-NULL, it must point to a function of the same type as MyErrorHandler above. If Routine is NULL, any error handler function currently installed will be uninstalled.
A failed call to the ADMXRC2_InstallErrorHandler function does not result in in any currently installed error handler function being called.
The error handler function is always called just before the API function generating the error returns. When the error handler is called, FunctionName will point to a NULL terminated string containing the name of the API function which failed and Code will contain the error code.
An installed error handler may itself make calls to the ADM-XRC API. However, it is the application programmer's responsibility to ensure that: