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.
0 Comments:
Post a Comment
<< Home