运行时错误检查Run-Time Error Checking

C 运行库包含支持运行时错误检查 (RTC) 的函数。The C run-time library contains the functions that support run-time error checks (RTC). 利用运行时错误检查,您可以生成程序来报告特定类型的运行时错误。Run-time error checking allows you to build your program such that certain kinds of run-time errors are reported. 您可指定如何报告错误以及报告哪些类型的错误。You specify how the errors are reported and which kinds of errors are reported. 有关详细信息,请参阅如何:使用本机运行时检查For more information, see How to: Use Native Run-Time Checks.

使用下列函数自定义程序执行运行时错误检查的方式。Use the following functions to customize the way your program does run-time error checking.

运行时错误检查函数Run-Time Error Checking Functions

函数Function 使用Use
_RTC_GetErrDesc_RTC_GetErrDesc 返回运行时错误检查类型的简要描述。Returns a brief description of a run-time error check type.
_RTC_NumErrors_RTC_NumErrors 返回可由运行时错误检查检测的错误的总数。Returns the total number of errors that can be detected by run-time error checks.
_RTC_SetErrorFunc_RTC_SetErrorFunc 将函数指定为报告运行时错误检查的处理程序。Designates a function as the handler for reporting run-time error checks.
_RTC_SetErrorType_RTC_SetErrorType 将一个由运行时错误检查检测到的错误与一个类型关联。Associates an error that is detected by run-time error checks with a type.

另请参阅See Also

按类别分的运行时例程 Run-Time Routines by Category
/RTC(运行时错误检查) /RTC (Run-Time Error Checks)
runtime_checks runtime_checks
调试例程Debug Routines