Previous: Tracing the Exchange of Data Packets, Up: Exchanging Data Packets in a Multithreaded Program [Contents][Index]
An interaction side can have an error handler assigned to it.
The error handler is a function called in the case of a failure in any Side API function that takes an argument of qsmm_side_t
type and can return an error code of int
type.
The default error handler of an interaction side prints information on an occurred error to stderr
and calls exit(2)
.
If an interaction side does not have an error handler assigned (including the default error handler), or an error handler assigned to the interaction side does not terminate program execution and returns, a failed Side API function returns a corresponding error code.
Use the following functions to query or set an error handler for an interaction side.
This function retrieves information on an error handler assigned to an interaction side.
If func_p is not NULL
, the function sets *func_p to the pointer to the error handler function or to NULL
if the interaction side does not have the error handler function assigned.
If param_pp is not NULL
, the function sets *param_pp to the user parameter of that error handler function.
This function assigns an error handler to an interaction side.
The argument func specifies an error handler function.
The argument paramp specifies the user parameter of this error handler function.
If func is NULL
, the interaction side does not use an error handler.
See Error Handling for a Multinode Model, for the description of qsmm_err_handler_func_t
type for an error handler function.