Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 9th, 2008, 12:25 PM
Authorized User
 
Join Date: Aug 2007
Location: new delhi, delhi, India.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Handle error from database layer to applican layer

How to handle an error/exception occurred in Database layer and pass it to Business layer then to Application Layer as a customized message.

Reply With Quote
  #2 (permalink)  
Old November 9th, 2008, 03:51 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

try
{
    ...
} catch ( Exception e ) {
    throw new MyOwnExceptionClass("An error occurred that I couldn't handle: " + e.toString());
}

You just catch the exception and then, if you want, throw a different exception.
Reply With Quote
Reply


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 Transactions from Business Logic Layer sonishpaul ASP.NET 2.0 Professional 1 December 3rd, 2007 05:52 AM
Menu layer wdwright BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 18th, 2007 08:11 PM
Layer Problem socoolbrewster CSS Cascading Style Sheets 4 August 2nd, 2006 12:33 PM
Database abstraction layer - OOP style w. paginati raul.ionescu PHP Databases 4 May 26th, 2006 03:19 PM
Database Abstraction Layer browngb BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 4 April 30th, 2005 03:34 PM



All times are GMT -4. The time now is 02:31 PM.


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