Exception Handling

Microsoft C++ supports two kinds of exception handling, C++ exception handling (try, throw, catch) and structured exception handling (__try/__except, __try/__finally). If possible, you should use C++ exception handling rather than structured exception handling.

Note   In this section, the terms “structured exception handling” and “structured exception” (or “C exception”) refer exclusively to the structured exception handling mechanism provided by Win32®. All other references to exception handling (or “C++ exception”) refer to the C++ exception handling mechanism.

Although structured exception handling works with C and C++ source files, it is not specifically designed for C++. For C++ programs, you should use C++ exception handling.