Client-Library and DB-Library require different error handler return values:
A DB-Library error handler can return:
INT_EXIT – causes DB-Library to print an error message, abort the program, and return an error indication to the operating system.
INT_CANCEL – causes DB-Library to return FAIL from the DB-Library routine that caused the error.
INT_TIMEOUT – on timeout errors, causes DB-Library to cancel the server command batch that timed out; on all other errors INT_TIMEOUT is treated as INT_EXIT.
INT_CONTINUE – on timeout errors, causes DB-Library to wait one timeout period and call the error handler again; on all other errors, INT_CONTINUE is treated as INT_EXIT.
A Client-Library message handler can return:
CS_SUCCEED – causes Client-Library to continue any current processing on this connection; on timeout errors, wait one timeout period and call the error handler again. CS_SUCCEED allows the application to continue after errors. DB-Library has no equivalent to this return code.
CS_FAIL – causes Client-Library to terminate any current processing on this connection and mark the connection as dead. The application must close and reopen the connection before using it again.
Note that error handler return values cannot directly cause Client-Library to abort the program.
The behavior of INT_CONTINUE is built into CS_SUCCEED.
In order to duplicate the behavior of INT_TIMEOUT, a Client-Library application must call ct_cancel(CS_CANCEL_ATTN) from the callback routine.
The error and severity codes for DB-Library errors do not map directly to Client-Library and CS-Library error and severity codes.
For more information:
See the Open Client and Open Server Common Libraries Reference Manual for information on coding a CS-Library error handler.
See the “Callbacks” topics page in the Open Client Client-Library/C Reference Manual for information on coding a Client-Library message handler.
See the “CS_CLIENTMSG Structure” topics page in the Open Client Client-Library/C Reference Manual for information on Client-Library error numbers.