Signal and Exception Handling

You can handle signals and operating system exceptions in any of the following ways:

When to Simply Debug
To eliminate exceptions that you suspect are due to program logic, use the debugger. For example, you should correct code that causes a divide by 0 exception, rather than programming a handler for that condition. The debugger provides complete notification and stack tracing is available.

Here are some other common problems:

For diagnostic purposes you can build your program with the /Tx compiler option.



Signals and Exceptions
Signal and Exception Handlers in DLLs
Signals and Exceptions in Critical Functions
Run-Time Library Environments
C++ Exception Handling


Program Signal Handling
Write or Register a Signal Handler
Write or Register an Exception Handler
Register an Exception Handler Using OS/2 APIs
Register an Exception Handler Using Preprocessor Directives
Get a Machine-State Dump


Asynchronous Exceptions
Signals and Default Handlers
OS/2 Exceptions and Default Handling
Windows Exceptions and Default Handling
Exception Information Provided by OS/2
Prototype of an OS/2 Exception Handler
OS/2 APIs That Interfere with Exception Handling
Example of an OS/2 Exception Handler
Exception Handling for Floating-Point Exceptions
Signal and Exception Handlers in Multithreaded Programs
Critical Functions
Floating-Point Bit Masks
Signal-Handling Considerations
Example of a Windows Machine-State Dump