first-chance exception

 The first-chance exception can be ignored because it is safely handled by the operating system. 
INFO: First and Second Chance Exception Handling (Q105675)
Structured exception handling (SEH) takes a little getting used to, particularly when debugging. It is common 
practice to use SEH as a signaling mechanism. Some application programming interfaces (APIs) register an
 exception handler in anticipation of a failure condition that is expected to occur in a lower layer. When the 
exception occurs, the handler may correct or ignore the condition rather than allowing a failure to propagate 
up through intervening layers. This is very handy in complex environments such as networks where partial 
failures are expected and it is not desirable to fail an entire operation simply because one of several optional 
parts failed. In this case, the exception can be handled so that the application is not aware that an exception has
 occurred. 

However, if the application is being debugged, it is important to realize that the debugger will see all exceptions 
before the program does. This is the distinction between the first and second chance exception. The debugger 
gets the "first chance," hence the name. If the debugger continues the exception unhandled, the program will
 see the exception as usual. If the program does not handle the exception, the debugger will see it again
 (the "second chance"). In this latter case, the program normally would have crashed had the debugger not 
been present. 

If you do not want to see the first chance exception in the debugger, then disable the feature. Otherwise, during 
execution, when the debugger gets the first chance, continue the exception unhandled and allow the program 
to handle the exception as usual. Check the documentation for the debugger that you are using for descriptions 
of the commands to be used.
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值