异常处理例程Exception Handling Routines

在程序执行期间使用 C++ 异常处理函数从意外事件恢复。Use the C++ exception-handling functions to recover from unexpected events during program execution.

异常处理函数Exception-Handling Functions

函数Function 使用Use
_set_se_translator_set_se_translator 将 Win32 异常(C 结构的异常)处理为 C++ 类型的异常Handle Win32 exceptions (C structured exceptions) as C++ typed exceptions
set_terminateset_terminate 安装 terminate 将调用的自身的终止例程Install your own termination routine to be called by terminate
set_unexpectedset_unexpected 安装 unexpected 将调用的自身的终止函数Install your own termination function to be called by unexpected
terminateterminate 引发异常后在特定情况下自动调用。Called automatically under certain circumstances after exception is thrown. terminate 函数可调用 abort 或使用 set_terminate 指定的函数The terminate function calls abort or a function you specify using set_terminate
unexpectedunexpected 调用 terminate 或使用 set_unexpected 指定的函数。Calls terminate or a function you specify using set_unexpected. 不会在当前 Microsoft C++ 异常处理实现中使用 unexpectedThe unexpected function is not used in current Microsoft C++ exception-handling implementation

另请参阅See Also

按类别分的运行时例程Run-Time Routines by Category