IONERROR(3)
HP-UX
NAME
ionerror − installs an error handler
SYNOPSIS
#include <sicl.h>
int ionerror (void (*proc)(INST id, int error));
DESCRIPTION
ionerror installs proc as the error handler for all SICL functions used in this process. Proc is called any time an error occurs. There is one and only one error handler for a given process. It handles all errors that occur to any session established from that process.
The id parameter passed to proc is set to the INST id of the session that generated the error. It should be noted that if the reason the error was generated was because of a bad INST id, the value passed to the error handler will also be invalid. Also if iopen generates an error before a session is established an (INST) 0 will be passed as the id.
Two special reserved values may be passed to ther ionerror routine:
I_ERROR_EXIT When this value is passed to the ionerror routine, it installs a special error handler which will print a diagnostic message to the stderr of the process and cause the process to terminate.
I_ERROR_NO_EXIT When this value is passed to the ionerror routine, it installs a special error handler which will print a diagnostic message to the stderr of the process and then continue execution.
To disable the error hanlder, pass 0 in the proc parameter.
RETURN VALUE
The ionerror command returns 0 on success, or a non-zero error number if an error occurred.
ERRORS
SEE ALSO
igeterrno(3), igeterrstr(3), igetonerror(3)
AUTHOR
ionerror was developed by HP.
Hewlett-Packard Company — September 29, 1999