vb.net 2005 and error handling query

Permabanned
Joined
24 Dec 2002
Posts
474
Location
Chelmsford, Essex. Bling Bling
In VB6 you had a few settings in the options screen to break on unhandled errors, break on all errors etc etc These options seem to be missing from VB 2005?

im converting an old VB6 app that we had over to 2005 and just want it to stop and go into debug mode on the error line rather than our generic error routine take over.

Any way you can make 2005 do this? Ive been through all the settings menus and cant see anything obvious.
 
I assume that you've got the same exception handling in VB.net as you have in C#.net ?

so it's

try{
do some stuff that might throw an exception
}
catch(SpecificException e1){
handle the specific exception that you were expecting
}
catch(Exception e2){
handle the odd unexpected exception
}

put your breakpoint on the lines that catch the exceptions...

HT
 
If you want to break on all exceptions go to Debug|Exceptions and check the "Thrown" box next to "Common Language Runtime Exceptions". It will then break and highlight the exception in blue indicating that is where it is thrown rather than where it is caught/unhandled.
 
Back
Top Bottom