Friday, June 25, 2010

In space, no one can hear you scream

Lately, most of my time is being spent refactoring legacy code. Everywhere I look I find try/catch blocks wrapped around a few lines of code. It appears the developer was using this as a way to "fix" bugs - by catching and eating the exception instead of tracking down the root cause. Enabling exception breakpoints and attempting to run the code is enough to make a developer scream. Unfortunately, if the exception isn't rethrown...

   catch (Exception)
   {
       // No one can hear you scream!
   }

I may have to put that on a t-shirt...

2 comments:

  1. Ha! Love it. Put me down for 2. :)

    ReplyDelete
  2. Haha, just saw this Pedro. That totally belongs on a shirt.

    ReplyDelete

Note: Only a member of this blog may post a comment.