Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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
  #1 (permalink)  
Old April 28th, 2005, 10:34 AM
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Handling

I've managed to successfully incorporate the PhilPage_Error event (which displays a customized, detailed error message) into my pagebase class of my own site. Here is my question regarding this event:

Being this event is for trapping errors which are unaccounted for in try-catch blocks in a given site, would it be considered good practice to do away with try-catches altogether and just rely on this event handler to fire everytime there's an error? If not, what are the drawbacks?

Thanks
  #2 (permalink)  
Old May 3rd, 2005, 09:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A "one size fits all" approach usually doesn't!

If you handle exceptions locally you can include extra context infomation in the error log, and you might be able to take corrective action in some cases.

Having a single place to log all errors normally doesn't give you enough information to deterine exactly where the error occured, and what the circumstances were surrounding the error.

You might want to look at Microsoft's Exception Management Application Block to learn more about "best practices" concerning the handling of exceptions.

Eric


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Handling harpua Beginning PHP 0 October 28th, 2006 12:05 PM
error handling Abhinav_jain_mca General .NET 5 December 21st, 2005 01:12 AM
Error handling Hudson40 Access VBA 2 February 11th, 2005 05:32 AM
Error Handling zaeem Classic ASP Basics 2 November 14th, 2003 10:42 AM
Error handling ! ittorget Classic ASP Professional 2 November 14th, 2003 09:44 AM





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