Mike-Ward.Net

Good Exception Management Rules of Thumb

Another great article from Scott Hanselman’s blog. I’ve been involved in more “discussions” on exception management than I care to remember. It surprises me how many developers see them as evil, even to the point of banning them from code. Exceptions are not evil, they’re a tool like anything else and it takes some understanding to wield them properly. Scott has some nice “Rules of Thumb” here that I totally agree with.

  • Exceptions are exceptional and should be treated as such. If something exceptional, unusual, or generally “not supposed to ordinarily happen” then an exception is a reasonable thing to do.
  • You shouldn’t throw exceptions for things that happen all the time. Then they’d be “ordinaries”.

more…

← newer older →
.Net, Technology, Life, Whatever

Recent Posts

Checklist Buddy Available for Testing
Tweetz 2.0.0 Released
Tweetz 2.0 Beta
VSColorOutput 2.7 - Time Stamps
Fixed Focal-Length Eyeglasses, a Programmer's Best Friend
How to Choose the Right VPN Service
Two Handy Command Line Scripts
More... (1089)

Donate