稳定性Robustness

使用以下 C 运行时库函数以提高程序的可靠性。Use the following C run-time library functions to improve the robustness of your program.

运行时可靠性函数Run-Time Robustness Functions

函数Function 使用Use
_set_new_handler_set_new_handler 如果 new 运算符无法分配内存,则将控制权传输到错误处理机制。Transfers control to your error-handling mechanism if the new operator fails to allocate memory.
_set_se_translator_set_se_translator 将 Win32 异常(C 结构的异常)处理为 C++ 类型的异常。Handles Win32 exceptions (C structured exceptions) as C++ typed exceptions.
set_terminateset_terminate 安装要由 terminate 调用的自身的终止函数。Installs your own termination function to be called by terminate.
set_unexpectedset_unexpected 安装要由 unexpected 调用的自身的终止函数。Installs your own termination function to be called by unexpected.

另请参阅See Also

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