VisualAge C++ and the operating system on which it runs both have the capability to detect and report run-time errors and abnormal conditions. Your application can detect them as signals or exceptions, and by handling them, terminate gracefully or recover and continue execution.
VisualAge C++ supports the following mechanisms for signals and exceptions:
Signals
Signals are facility built on operating exceptions defined by
ANSI C. You can use them in C and C++ to intercept operating
system exceptions in a portable way. Different signals
differentiate between error conditions. The following kinds of
events raise signals:
Operating System Exceptions
The operating system throws exceptions when certain abnormal
conditions occur. The VisualAge C++ library provides a C-language
exception handler, _Exception, to map operating exceptions to C
signals and signal handlers. Instead of using _Exception in your
application, you can create and use your own exception handlers.
Operating system exceptions are synchronous or asynchronous depending on the relationship between their cause and the execution of the program.
For more information on operating system exceptions and exception handlers, see the documentation for your operating system.
C++
Exception Handling
C++ exceptions constructs, such as try, throw and catch, exist
only within the C++ language. VisualAge C++ implements C++
exception handling using the exception-handling facility of the
operating system. However, C++ exception handlers cannot
intercept operating system exceptions, such as access violations.
Structured Exception Handling
C Structured Exception Handling provides constructs
similar to C++ try blocks to capture operating system exceptions
in C code.
![]()
Signal and Exception Handling
Signals and Exceptions in Critical
Functions
Run-Time Library Environments
![]()
Choose Signal or Exception
Handlers
Program Signal Handling
Handle Floating-Point Exceptions
Get a Machine-State Dump
![]()
Asynchronous Exceptions
Critical Functions
Default Exception Handling (OS/2)
Default Exception Handling
Exception Handling for
Floating-Point Exceptions
Exception Information Provided by OS/2
OS/2 APIs that Interfere with
Exception Handling
Floating-Point Bit Masks
Structured Exception
Handling (C)
