Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grabbing Unhandled Exceptions in Winforms (C#)
Message
From
12/03/2008 15:12:30
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01301455
Message ID:
01301475
Views:
16
Here's how I do it in VB.NET:
Try
   'Code
Catch ex as System.IndexOutOfRangeException
   'Handle a built in exception
Catch ex As MyCustomException
   'Handle my custom exception
Catch ex As Exception
   'Handle all other exceptions here
Finally
   'Clean up code
End Try
>I am not having a problem, I just want to know how to handle them, what is the c# code for handling the base Exception class? Better yet, point me to the documentation page.
>
>>>>>>>>>>Can you verify in the debugger that the exception does indeed happen within the Try Catch block? Also, are you catching the base Exception class?
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform