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:
No Comments/Pingbacks for this post yet...
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.