Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
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 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
Old November 9th, 2008, 12:25 PM
Authorized User
Join Date: Aug 2007
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.

Old November 9th, 2008, 03:51 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

} 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.

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

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