Monday, December 19, 2005

Exception Policies

The following are some “Exception Policies” from Patterns & Practices:
  • Exceptions of type ApplicationException should be logged
  • Exceptions of type SqlClientException should be caught and wrapped with an exception of type DataLayerException and re-thrown
  • Exceptions of type SecurityException should caught and replaced with an AccessDeniedException which will be thrown

Adopted from Tom Hollander's slides: Enterprise Library for .NET 2.0:Architecture & Lessons Learned.


Post a Comment

<< Home