In my opinion, you should usually try to catch the exceptions that you expect to get from the code that you call in the try block, and let the rest go to another place. For instance:
try { // ... some code that you know may throw ArgumentException or any other known exceptions } catch (ArgumentException ex) { // ... handle the exception with a good idea of why it was thrown }
In the catch block, you can now handle the error in a clean, specific way, knowing that the invalid argument was passed somewhere in the try block. For example, you can warn the user that they provided an invalid argument.
If something happened that you did not expect (for example, a NullReferenceException), you probably do not know how to recover it, therefore, without catching it, you delegate responsibility to the consumer of your component in order to deal with exceptional situations in general.
In short, you should catch exceptions when you know how to handle or fix the error, and allow detection of unknown errors above call chains
Make sense?
source share