First chance vs Second chance exception

半腔热情 提交于 2019-12-01 09:14:14

See here: http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx

In short, First chance exception gives the debugger a first chance to inspect the exception and application state before the application handles the exception.

You can stop the debugger at this point (it' usually a setting like "break into debugger when exception is created". Often this is off by default). If you don't, or if you let the application continue to run, the exception is passed on to the application.

The debugger gets a second chance at the exception when the application doesn't handle it. Again, you can break into the debugger here (this isusually on by default).

Note that if the application doesn't handle the exception, the application will usually terminate.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!