Don’t Derive from ApplicationException

According to this blog entry (or rather, the annotations), deriving from Exception is the correct course to take. ApplicationException apparently doesn’t provide any discernible value. Coming from the folks who actually built the .NET Framework, that’s quite a surprise to me. I can’t think of any example I’ve seen from Microsoft (or anyone else) on exceptions that doesn’t derive from ApplicationException.

A quick look at my office bookshelf confirms that this guidance is even older than the blog post. In Applied Microsoft .NET Framework Programming, Jeffrey Richter writes the following on pages 410-411:

“… I don’t think there is any value in having the SystemException and ApplicationException base types in the exception hierarchy.  In fact, I think having them is just confusing.”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.