Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception Handling in n-tier application
Message
From
25/03/2008 15:06:23
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Exception Handling in n-tier application
Environment versions
Environment:
VB 8.0
Miscellaneous
Thread ID:
01305376
Message ID:
01305376
Views:
79
I have been reading a few MS books and they seem to have different advice on how to handle Exceptions in a n-tier application. The Microsoft 70-536 training guide states that all code besides simple variable declarations should be included within a Try Catch block. The Framework Design Guidelines from the Microsoft Development Series states that only exceptions where you have explicit procedures to handle the specific error, and that you should never catch a base type Exception, rather, you should have the application crash.

I understand the basic functionality of Exception Handling, but I am trying to find the best way do it. Before I had all of the code in the DataAccess class wrapped in a Try Catch block, where if it was a base Exception I would rethrow the exception. I would do the same thing in the BusinessLogic class, and in my UI class I would have all of the code wrapped in Try Catch blocks, but handling the exceptions appropriately. This seems to be the wrong way to go about this.

Can somebody explain their Exception Handling framework? Thanks!
Very fitting: http://xkcd.com/386/
Next
Reply
Map
View

Click here to load this message in the networking platform