First Chance Exceptions

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Is there any way to find out what is causing a "First Chance Exception"?
Also, is there anyway to turn them off....I'm getting hundreds but all seems
to run OK. I"m using VB 2008 Express Edition.
 
Thanks but I tried that but it didn't work...note that I have VB 2008, not VB
2005. I did find that my project that I converted to VB 2008 did have some
sub-projects thad don't get converted when the main project is converted. I
converted all of my projects to VB 2008 and now I don't get any exceptions.
Thanks again.
 
Dennis said:
Is there any way to find out what is causing a "First Chance Exception"?

Odd though it may seem, Exceptions are actually "thrown" /twice/:
The first "throw" is the run-time walking the call-stack in search of a
suitable "Catch" block to deal with the Exception.
The second is what /we/ would call "throwing" the Exception, executing
all the intermediate Finally blocks before resuming at the start of the
selected Catch block.

That first pass is a "First Chance" Exception; it's an Exception in
search of a Catch block to handle it but not yet "really" thrown.
Also, is there anyway to turn them off...

Not AFAIK.
I'm getting hundreds but all seems to run OK.

This is perfectly normal where Exceptions are being thrown and properly
caught.

HTH,
Phill W.
 
Thanks for you clairication on this topic and confirmation of what I
suspected in that there is no way to turn them off.

When I converted all the sub-projects included in my main project to VB 2008
from VB2005, I dont' seem to get any more "first chance" exceptions.
 
Back
Top