This topic discusses how to handle error conditions, exceptions, and signals with z/OS® XL C/C++. It describes how to establish, enable and raise a signal, and provides a list of signals supported by z/OS XL C/C++.
In 31-bit applications, z/OS Language Environment® uses a stack-based model to handle error conditions. This environment establishes a last-in, first-out (LIFO) queue of 0 or more user condition handlers for each stack frame. The z/OS Language Environment condition handler calls the user condition handler at each stack frame to handle error conditions when they are detected. For more information about the callable services in z/OS Language Environment, refer to Handling signals using Language Environment callable services.
The C error handling approach using signals is supported in a z/OS XL C++ program, but there are some restrictions (refer to Handling C software exceptions under C++). See Signal handlers for more information.
This topic also describes some aspects of C++ object-oriented exception handling. The object-oriented approach uses the try, throw, and catch mechanism. Refer to z/OS XL C/C++ Language Reference for a complete description. Some library functions (abort(), atexit(), exit(), setjmp() and longjmp()) are affected by C++ exception handling; refer to z/OS XL C/C++ Runtime Library Reference for more information.