Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Practical examples of Try/Catch/Finally
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00836428
Message ID:
00836956
Vues:
25
They made a mistake. The catch block should never be empty. Do NOT eat exceptions! This is one of my pet peeves. Only catch the exception if you know how to deal with it or else re-throw it.


>In fact, I was at a presentation last night by a group of developers who developed and maintain a very nice asp.net site (BostonDotNet) where they were sharing the ideas of their design. When they showed code of some of the pages, I noticed that the Catch block in one place was empty. That is, I see the code like:
>
>
>try
>{
>// bunch of code here
>}
>catch {}
>// more code
>
>
>I was wondering why they need the try and catch if there was nothing in catch?
>
>But maybe I am missing something. That's why I am asking questions.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform