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

Quick Tip - Clear ReSharper's Cache to Fix False Errors
Quick Tip - Refined GitHub
Vertical Layout for HTML Tables
Visual Studio 2017 Installer Quick Tip
VSColorOutput for VS 2017 Released
Quick ReSharper tip for inline templates
NoSQL vs. NewSQL: What's the Difference?
More... (1077)

Donate with PayPal