Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grabbing Unhandled Exceptions in Winforms (C#)
Message
De
12/03/2008 15:12:30
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01301455
Message ID:
01301475
Vues:
15
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/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform