.NET exception throwing guidelines

01/24/09

Permalink 09:46:21 pm, by truewill Email , 107 words, 516 views   English (US)
Categories: C#, .NET, Windows

.NET exception throwing guidelines

I put together a flowchart based on the exception throwing guidelines in Framework Design Guidelines 2nd Ed. It’s available in PDF format at:

ExceptionsDotNet.zip (1.75 MB)

Note: These are just guidelines. InvalidOperationException is not the only choice at one point in the flowchart; to quote the book, “The list is by no means exhaustive.” For developers who return error codes, return null on failure, throw System.Exception, etc., following these guidelines will keep them out of trouble. (Hopefully that’s not my readership, but I’m sure you know a coworker…)

Update - January 27, 2009

Readers might find this blog article interesting as well:

Finding the right exception to throw

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
The name truewill is composed of two other words. What is the SECOND word?

Development Central

Development Central is the blog of Bill Sorensen, a professional software developer. Much of this will relate to C#, .NET, and OOP in general.

Disclaimer
These postings are provided "AS IS" with no warranties and confer no rights.

Search

Categories

Linkblog

b2evolution

contributors

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 2

powered by b2evolution free blog software