Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Studio 12.3: C++ User's Guide Oracle Solaris Studio 12.3 Information Library |
3. Using the C++ Compiler Options
6. Creating and Using Templates
8.1 Synchronous and Asynchronous Exceptions
8.4 Using Runtime Functions and Predefined Exceptions
8.5 Mixing Exceptions With Signals and Setjmp/Longjmp
8.6 Building Shared Libraries That Have Exceptions
9. Improving Program Performance
10. Building Multithreaded Programs
12. Using the C++ Standard Library
Five runtime error messages are associated with exceptions:
No handler for the exception
Unexpected exception thrown
An exception can only be re-thrown in a handler
During stack unwinding, a destructor must handle its own exception
Out of memory
When errors are detected at runtime, the error message displays the type of the current exception and one of the five error messages. By default, the predefined function terminate() is called, which then calls abort().
The compiler uses the information provided in the exception specification to optimize code production. For example, table entries for functions that do not throw exceptions are suppressed, and runtime checking for exception specifications of functions is eliminated wherever possible.