该如何理解这段话?

hitman 2001-10-02 01:19:24
TCPL中的
From the language's point of view, an exception is considered handled immediately upon entry into its handler so that any exceptions thrown while executing a handler must be dealt with by the callers of the try-block. For example ,this does not cause an infinit loop:

class Input_overflow{/*...*/};

void f()
{
try{
//...
}
catch(Input_overflow){
//...
throw Input_overflow();
}
}



...全文
48 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
GRIEG 2001-10-02
  • 打赏
  • 举报
回复
catch语句只catch try抛出的异常。
jt80 2001-10-02
  • 打赏
  • 举报
回复
看不懂鸟语啊~~
throw Input_overflow()抛出异常~
catch(Input_overflow)捕获异常~~
如果你的程序里有异常,会导致程序终止啊~
hitman 2001-10-02
  • 打赏
  • 举报
回复
为什么不会引起无限循环呢?
windindance 2001-10-02
  • 打赏
  • 举报
回复
在catch()里抛出异常会导致...问题,使程序直接终止.

69,373

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧