I\'m currently in the process of writing my first Windows Forms application. I\'ve read a few C# books now so I\'ve got a relatively good understanding of what language feat
I like the philosophy of not catching anything I don't intend on handling, whatever handling means in my particular context.
I hate it when I see code such as:
try
{
// some stuff is done here
}
catch
{
}
I have seen this from time to time and it is quite difficult to find problems when someone 'eats' the exceptions. A coworker I had does this and it tends to end up being a contributor to a steady stream of issues.
I re-throw if there is something that my particular class needs to do in response to an exception but the problem needs to be bubbled out to however called the method where it happened.
I think code should be written proactively and that exceptions should be for exceptional situations, not to avoid testing for conditions.