Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Practical examples of Try/Catch/Finally
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00836428
Message ID:
00836956
Views:
24
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform