This is not ‘How To Catch All Exceptions’ but rather ‘Should You Catch All Exceptions’? In C# .NET I’ve noticed a tremendous amount of exceptions. Is it advisable to plan on catching every exception?
For example the DirectoryInfo() constructor throws 4 exceptions. Should I plan on catching these or only catch the ones that I can handle? Maybe let the others bubble up to Main() where I have a catch-all that then tells the user there is an uncaught exception. It just seems with all these possible exceptions your code could become more exception-handling than actual code.
Only catch the ones that make sense to handle for the level of abstraction at which you are writing the code. Most exceptions will only be caught at a much higher level than where they are thrown.
So yes, you are correct. 🙂