加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 如果未捕获异常会发生什么?

发布时间:2020-12-16 09:27:11 所属栏目:百科 来源:网络整理
导读:我不是要求一个意外的异常,而是一个未捕获的异常. 失事?还是终止? 解决方法 根据§15.3/ 9: If no matching handler is found in a program,the function terminate() is called ; whether or not the stack is unwound before this call to terminate()
我不是要求一个意外的异常,而是一个未捕获的异常.

失事?还是终止?

解决方法

根据§15.3/ 9:

If no matching handler is found in a program,the function terminate() is called; whether or not the stack is unwound before this call to terminate() is implementation-defined (15.5.1). Emphasis mine

之后会发生什么事情取决于您的操作系统.在实践中:崩溃. (或者,如果你在调试器中,“嘿,你没有抓住这个.”)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读