Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Ads  
Biz Modules provides professional business modules and solutions for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Is "Try Catch" slow?
Previous Previous
 
Next Next
New Post 7/6/2008 10:36 AM
User is offline Brandon Haynes
694 posts
everysport.net
7th Ranked


Re: Is "Try Catch" slow? 

I've hesitated to respond further on this thread, but I guess I'll throw another two cents into the pot.

With due respect, I'm a big fan of everything that Joe outlined except the final catch(Exception ex).  If a method could handle the exception, then it would be doing so with a more specific catch.  The catch is thus inherently unhandlable, and there is no way for the method to return the application to a valid state.  An unhandlable exception should be propagated to a handler that DOES know how to handle the specific exception.  This makes debugging much, much easier.  Hiding exceptions through a general Catch(Exception) makes debugging more difficult.  This is (one reason) why FxCop warns warns against such behavior.

Others will make a very reasonable argument that web applications should not fail hard and allow for graceful top-level handling of an unhandled exception.  This is fine.  But at the framework- and module-level, Catch(Exception) has no place.  In fact, there have been a couple instances in DNN where an exception was swallowed via a general handler that significantly added to my debugging time.

There are plenty of reasonable people on both sides of this debate.  Both camps have very valid points.  Just thought I'd present the other view :)

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Is "Try Catch" slow?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk
TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com
The Forerunner Network
The Forerunner Network consists of a group of Dynamic Website & Interactive Membership Portal hosting services that are managed by Forerunner Communications. Our services span a wide range of markets and enable individuals, organizations and businesses to build and manage dynamic, interactive portals and websites.
The Forerunner Network

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP