Exception Handling Routines

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Exception Handling Routines.

Use the C++ exception-handling functions to recover from unexpected events during program execution.

Exception-Handling Functions

FunctionUse.NET Framework equivalent
_set_se_translatorHandle Win32 exceptions (C structured exceptions) as C++ typed exceptionsNot applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
set_terminateInstall your own termination routine to be called by terminateNot applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
set_unexpectedInstall your own termination function to be called by unexpectedNot applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
terminateCalled automatically under certain circumstances after exception is thrown. The terminate function calls abort or a function you specify using set_terminateNot applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
unexpectedCalls terminate or a function you specify using set_unexpected. The unexpected function is not used in current Microsoft C++ exception-handling implementationSystem::Exception Class

Run-Time Routines by Category

Show: