-
Exception Handling
HI,
my asp.net project has 3 tier (UI, BLL, DAL) architecture. can any body tell me the best way to handle the exception.
will appreciate your help
-
It depends on what kind of exception it is. If it's something the user can do something about, such as invalid input, then re-throw the exception in the BLL and/or DAL and catch in the UI and display a message to the user. If the user cannot correct the problem, then catch it in the Application_Error event and write detailed information to a log to help you debug it. Then decide whether the application can continue silently, or whether you must tell the user that something went wrong.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
you can do this in your DLL functions..
eg.,
internal DataSet fun(BLL objBL)
{
try
{
//your connection, procedures here...
}
catch(Exception ex)
{
ex.Message(); // can display this message in your page by converting this as session object
}
finally
{
}
return ds;
}
hope this may help for u.....
Cheers..
Similar Threads
-
By Peter_APIIT in forum C++
Replies: 17
Last Post: 06-13-2007, 11:19 PM
-
By josie cayetano in forum Database
Replies: 1
Last Post: 09-17-2002, 10:01 PM
-
By KracKHed in forum .NET
Replies: 3
Last Post: 07-19-2002, 04:52 PM
-
By David Williams in forum .NET
Replies: 1
Last Post: 05-28-2002, 02:19 PM
-
By Jonathan Wood in forum .NET
Replies: 10
Last Post: 02-04-2001, 08:36 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks