Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 10th, 2005, 11:59 AM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default Errors in a business layer


I'm developing an n-tier system, with a presentation layer (ASP.NET site), business layer (class library), data layer (class library), and security layer (class library).

I was curious if anybody had any ideas regarding errors in the business layer. I have try catch blocks for catching errors in the business layer, but am not sure quite how to handle getting the error back to the user interface. I don't want to get into a habit of throwing errors due to performance, so I was curious if anybody had any implementations that they would like to share.


  #2 (permalink)  
Old February 11th, 2005, 02:27 PM
Friend of Wrox
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post

Hi Brian,
I think you can make an event in your inner layers and use them in outer layers, for example you can have an public event like ErrorNotify,
catch(Exception oException)
  //do some other stuff
  //execute the event(call its method)
  //and send the exception inside your own EventArgs
then in your ASP.NET layer(the next layer) you can use this event like
BLobject.ErrorNotify+=new ErrorNotifyHandller(ErrorOccured)
//then in your ErrorOccured method you can 
//redirect users to ErrorPage.aspx
also you can make your own EventArgs and ErrorNotifyHandller delegate in another assembly then in your ASP.NET page you would receive your ownEvenetArgs as a parameter of your ErrorNotifyHandller delegate.

software student.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Handle error from database layer to applican layer khatu_jec ASP.NET 2.0 Basics 1 November 9th, 2008 03:51 PM
Transparent Business Layer pinch BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 February 17th, 2008 02:19 AM
Do we need Business Logic Layer.vb files? cJeffreywang ASP.NET 2.0 Professional 12 January 12th, 2008 06:28 AM
Handle Transactions from Business Logic Layer sonishpaul ASP.NET 2.0 Professional 1 December 3rd, 2007 05:52 AM
Question about Business Layer hasanali00 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 March 21st, 2005 06:49 PM

All times are GMT -4. The time now is 01:36 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.