Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
When an unexpected exception occurs in your program , sometimes you just want to skip it since killing the program at that point is more harmful than continuing. Or you just want to continue since you were more interested in another error/bug.
Is there an option/compilerflag/secretswitch to enable this?
I understand exceptions should be resolved right away, but there are scenarios (like I described) where one just wants to skip it for the time-being.
Posted
Updated 25-Nov-10 23:43pm
v3

 
Share this answer
 
v2
Comments
Dalek Dave 26-Nov-10 5:00am    
Good Links
Hi, see code below:
MIDL
string s = "horrible";
float f = float.Parse(s);
Application.DoEvents();

This would raise an exception on the second line. When you caught some exception like this in the debugger, you might just drag the execution pointer(a yellow right arrow icon ahead the excepted line in visual studio) to the next line or some other place you want.
Hope this helps.
 
Share this answer
 
v2
Comments
JF2015 26-Nov-10 5:20am    
Good one - 5. Here is a msdn link with the description: http://msdn.microsoft.com/en-us/library/09yze4a9%28VS.80%29.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900