Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

First chance vs Second chance exception

Tags:

adplus

When I generate a dump file using ADPlus, I get both First chance and second chance exception but when I use task manager for generating dump file, I only get once dump file. Is it the second chance exception? I am bit confused about this 1st and 2nd chance exception anyways even though i have read a little bit about it. May be if someone can provide some good analogy, that might clear up things for me

like image 232
imak Avatar asked Dec 21 '22 21:12

imak


1 Answers

See here: Link

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.

like image 179
peterchen Avatar answered Mar 10 '23 22:03

peterchen