DNK has a spanking new server up and running like clockwork. Stability problems are a thing of the past. Our new monitoring service reports 100% uptime since the move!
20
kicks
published 1 year, 11 months ago, submitted by senfo senfo 1 year, 11 months ago

blogs.msdn.com — In its best practices guideline, Microsoft specifies that a generic Exception should not be caught. But why is this?

Add a comment 3 comments | category: | Views: 17 | Get KickIt image code
Why Not To Catch General Exception Types
| tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
of of my "favorite" projects I worked on was when a developer would always do try { ScaryThing(); } catch { /* completely empty */ }, this was his exception handler for all situations.

I knew I hit one of his bugs when all of a sudden the app just stopped dead in its tracks, and boy were they fun to track down...
posted by tortus 1 year, 11 months ago
tortus, I've also run across "error handlers" written like that. And you're right, they can be incredibly frustrating. But that was nothing compared to what a friend of mine was working on. Code written by the same guy that wrote the frustrating code I ran into, a new project was throwing literally thousands of exceptions per minute to mask bugs. It was an incredibly idiotic design, to say the least. Surprisingly, the lead developer on the project saw absolutely nothing wrong with the project and how it handled exceptions. Truly a case where the people in charge were entirely too incompetent to perform their job, but had too much power to allow anything to change.
posted by senfo senfo 1 year, 11 months ago
Empty catch clauses and using exceptions instead of normal error handling are mortal sins that require immidiate crucifiction when encountered. ;-)
posted by fehaar 1 year, 11 months ago



information Login or create an account to comment on this story

Related Stories:
 

Search: