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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
 


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
701 posts
brandonhaynes.org
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.

 


$7.16/mo - Powerful DotNetNuke / DNN Hosting
Powerful DotNetNuke / DNN Hosting on Windows 2008 and 2003 servers, starting at under $8/mo with FREE SQL 2008 on certain plans and FREE SQL 2005 on all plans with FREE Installation and expert support.
www.re-invent.com
ASP.NET Web Hosting for $3.95
3 Month FREE ASP.NET Hosting! FREE Setup! DNN Support! FREE Domain Name! FREE Components! Host multiple websites on 1 plan! 30 Days Money Back Guarantee!
www.dailyrazor.com
Cestus Websites
DotNetNuke websites en services in Nederland. Cestus Websites levert websites, projectmanagent, skins, modules, training en gespecialiseerde hosting op basis van het CMS DotNetNuke.
www.dotnetnuke-websites.nl

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