Don't catch all exceptions

One of the best practices on exception is don't catch all exceptions. There are many reasons why this is a best practice. For example, You want to look at the application state when the exception is thrown so that you can understand exactly why the exception is thrown. The exact state is often lost when exception is caught and application is continued.

Here is another example why should not catch all the exceptions.

One team found a strange deadlock when turning on fusion binding log. After a long try and diagnose, we finally understand what is going on.

By default fusion uses IE cache to store the binding log. To do so fusion uses wininet APIs.

In this particular case, wininet hits an access violation while holding a wininet lock. the access violation exception is propogated, caught, ignored, and continued. But the wininet lock is still held.

Later on when fusion calls wininet to store a log to IE cache, wininet waits on the lock indefinitely.