std::terminate_handler

定义于头文件 <exception>
typedef void (*terminate_handler)();

std::terminate_handler 是函数指针类型(指向不接收参数且返回 void 的函数),这些函数为 std::set_terminate 安装,为 std::get_terminate 查询,并为 std::terminate 调用。

C++ 实现提供默认的 std::terminate_handler 函数,它调用 std::abort() 。若安装空指针值(以 std::set_terminate 的手段),则实现可以恢复默认安装的处理函数。

参阅

异常处理失败时调用的函数
(函数)
更改将被 std::terminate 调用的函数
(函数)
获得当前的 terminate_handler
(函数)

版本历史

  • (当前 | 先前 2017年5月5日 (五) 03:53Fruderica讨论 | 贡献. . (810字节) (-804). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 09:06P12bot讨论 | 贡献 . . (1,614字节) (-76). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 14:56P12bot讨论 | 贡献 . . (1,690字节) (+281). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 11:37P12讨论 | 贡献 . . (1,409字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 07:00TranslationBot讨论 | 贡献. . (1,409字节) (-14). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月25日 (四) 14:25P12讨论 | 贡献 . . (1,423字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 13:00TranslationBot讨论 | 贡献. . (1,423字节) (+1,423). . (Translated from the English version using Google Translate)