Standards / Extensions | C or C++ | Dependencies |
---|---|---|
ANSI/ISO |
C++ only |
#include <exception>
unexpected_handler set_unexpected(unexpected_handler ph) throw();
The set_unexpected() function is part of the z/OS® XL C++ error handling mechanism. The argument supplied to set_unexpected() is of type unexpected_handler as defined in the header <exception> (that is, a pointer to a function with a void return type and no arguments). The function specified will be called by the unexpected() function.
In a multithreaded environment, the unexpected() function created by the issuance of a set_unexpected() call applies to all threads in the (POSIX) process.
set_unexpected() returns the address of the previous unexpected_handler.
Refer to z/OS XL C/C++ Language Reference for more information about z/OS XL C++ exception handling, including the set_unexpected() function.