Geeks With Blogs
Sandu's Blog Views on life as a techie


Recently I was given the task of writing a POC for a Reference Architecture for the ASP.NET applications we develop in our company. We decided early on in the process that we are going to use Microsoft Enterprise Library for exception handling, logging and data access.

Using the exception handling application block in Enterprise Library is quite an easy task. You just define the policies for exceptions in the web.config and handle exceptions in by naming those policies. The exception policies could include a combination of Logging, Wrapping, Replacing, etc defined for each exception type.

When researching on the best practices for Exception Handling this Microsoft Best Practices article was one of the sources I found. One interesting point in it caught my eye, which was;

"For most applications, derive custom exceptions from the Exception class. It was originally thought that custom exceptions should derive from the ApplicationException class; however in practice this has not been found to add significant value. "

When looking further on this topic I noticed that there was a divide in the community on this issue, especially since Microsoft itself has suggested earlier to use the ApplicationException instead of the Exception class.

I found a good article which tries to clarify this cofusion which seems to be a good approach for me.


Posted on Tuesday, October 21, 2008 4:47 PM | Back to top

Comments on this post: Best Practices for Exception Handling

# Drum handling equipment
Requesting Gravatar...
Thanks for sharing good post. Drum Handling equipments ave very useful to perform various drum operations.
Left by Anthony T on Jun 03, 2011 2:51 AM

Your comment:
 (will show your gravatar)

Copyright © Sandaruwan Fernando | Powered by: