The typical code spends about ninety percent of its time handling conditions that occur less than one percent of the time. Structured Exception Handling (SEH) allows you to write code that concentrates on the normal case and relegates anomalous conditions to an exception handler. The programmer will spend more of their time focused on the code that actually does what the function is supposed to do rather than clutter the output with checking for exceptional cases.
There are several differences between Structured Exception Handling and C++ Exception handling. The differences are summarized below:
| signal(handler); |
|
| #pragma handler(x) |
|
| SEH |
|
| C++ throw/catch |
|
There are two types of exception handling in SEH. They are Termination handling and Exception handling.
![]()
Termination Handler
Exception Handler
