<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx</link><description>During my recently FrontLine trip I gave a talk on exception handling … One of the points I made is that if possible you should leverage one of the existing exception types in the BCL. I was asked a couple of times what the common exception types area.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#402817</link><pubDate>Mon, 28 Mar 2005 04:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:402817</guid><dc:creator>Uwe Keim</dc:creator><description>Cool. I'm sure there is a tool to create those textual class diagrams?!?</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#402821</link><pubDate>Mon, 28 Mar 2005 05:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:402821</guid><dc:creator>Brad Abrams [MSFT]</dc:creator><description>Yes, I wrote it back when we did vol1 of the SLAR... It is very messy code, so I don't want to post it as-is... Maybe i'll look into cleaning it up..</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#402851</link><pubDate>Mon, 28 Mar 2005 08:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:402851</guid><dc:creator>sbjorg</dc:creator><description>I said it while at MS and I'll say it again, having this much exceptions is overkill.  You should differentiate b/w exceptions that make sense being caught during runtime and exceptions  that exist purely for informational purposes during debugging.  For instance, why would I want to programmatically distinguish among the different kinds of arithmetic exceptions?  Why do you feel justified burdening developers with this cognitive burden?  To what gain?</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#402988</link><pubDate>Mon, 28 Mar 2005 18:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:402988</guid><dc:creator>.</dc:creator><description>Aren't you supposed to descend from ApplicationException for your own exceptions?</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403028</link><pubDate>Mon, 28 Mar 2005 20:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403028</guid><dc:creator>Ifeanyi Echeruo</dc:creator><description>sbjorg: &amp;quot;or instance, why would I want to programmatically distinguish among the different kinds of arithmetic exceptions?&amp;quot;&lt;br&gt;&lt;br&gt;I dont understand what's so hard about&lt;br&gt;&lt;br&gt;try {&lt;br&gt; ...&lt;br&gt;}&lt;br&gt;catch(System.ArithmeticException e) {&lt;br&gt; ...&lt;br&gt;}&lt;br&gt;</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403029</link><pubDate>Mon, 28 Mar 2005 20:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403029</guid><dc:creator>Kevin Westhead</dc:creator><description>Deriving from ApplicationException was the original advice offered, but that guideline will be changing (FxCop has already changed to reflect the new thinking). It seems that the original idea was to offer the ability to group framework exceptions (those that derive from SystemException) and non-framework exceptions (those that derive from ApplicationException), however your non-framework exceptions may as well be derived from Exception since ApplicationException just adds an extra level of depth to the hierarchy.</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403140</link><pubDate>Tue, 29 Mar 2005 01:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403140</guid><dc:creator>Judah Himango</dc:creator><description>Looks like Krzysztof just published some great info on .NET exceptions: &lt;a target="_new" href="http://blogs.msdn.com/kcwalina/archive/2005/03/16/396787.aspx"&gt;http://blogs.msdn.com/kcwalina/archive/2005/03/16/396787.aspx&lt;/a&gt;</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403192</link><pubDate>Tue, 29 Mar 2005 05:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403192</guid><dc:creator>Jeff Atwood</dc:creator><description>I have a little code sample that iterates through all .NET classes and then sorts/lists all the ones that end in &amp;quot;Exception&amp;quot; here:&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://www.codinghorror.com/blog/archives/000115.html"&gt;http://www.codinghorror.com/blog/archives/000115.html&lt;/a&gt;</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403222</link><pubDate>Tue, 29 Mar 2005 07:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403222</guid><dc:creator>Igor Brejc</dc:creator><description>Thanks for the list, it is just what I was searching for in MSDN docs few days ago, but didn't find it :).&lt;br&gt;One comment though: If you re-use certain existing exceptions (NullReferenceException is one example), FxCop will give you a warning about non-compliancy with MS design guidelines. Those exceptions are meant to be thrown by runtime only, and not by user applications.&lt;br&gt;Maybe you could include this information individualy for each exception type in the exception hierarchy?</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403246</link><pubDate>Tue, 29 Mar 2005 10:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403246</guid><dc:creator>Christophe Nasarre</dc:creator><description>Here is a tool you can use to get the exception hierarchy with assembly information: &lt;br&gt;&lt;a target="_new" href="http://spaces.msn.com/members/cnasarre/Blog/cns"&gt;http://spaces.msn.com/members/cnasarre/Blog/cns&lt;/a&gt;!1pmtDU_7A3ODVjdKP4wqJqkg!212.entry&lt;br&gt;</description></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403274</link><pubDate>Tue, 29 Mar 2005 12:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403274</guid><dc:creator>David Levine</dc:creator><description>There are many other exceptions defined in mscorlib.dll then the ones listed. In addition to the other points, e.g. FxCop complaining about using some of the exception types, some other points on the exceptions listed...&lt;br&gt;&lt;br&gt;ThreadAbortException does not offer any of the standard constructors .ctor(), .ctor(string message) or .ctor(string message,Exception inner). This only matters because it means that you cannot create your own instance of this exception, so you cannot directly throw it, you should use the Thread.Abort() API. I don't think it should be included in the list of exceptions that applications should be directly throwing.&lt;br&gt;&lt;br&gt;I don't believe applications should be throwing ExecutionEngineException, StackOverflowException, or OutOfMemoryExceptions. In earlier versions of the runtime throwing any of these caused occasional strange results with the runtime (such as it shutting down). I also cannot think of a good reason why an application would be correct in throwing one of these.&lt;br&gt;&lt;br&gt;ObjectDisposedException and TypeInitializationException do not have a default constructor, so serializing them across a machine boundary might cause problems. I would test this before doing so.&lt;br&gt;&lt;br&gt;Some minor observations...&lt;br&gt;ArgumentNullException, ArgumentOutOfRangeException, DuplicateWaitObjectException, &lt;br&gt;ObjectDisposedException do not offer the standard .ctor(string message,Exception inner) &lt;br&gt;constructor. This isn't really a problem but it is non-standard.&lt;br&gt;&lt;br&gt;System.NotFiniteNumberException, SecurityException, and TypeInitializationException do not override the Message property to offer a better exception message. Again, minor, but there seems to be little value in a special exception if it does not provide additional clarification.&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>Some Quick Tidbits</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403292</link><pubDate>Tue, 29 Mar 2005 15:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403292</guid><dc:creator>Jesse Squire's Weblog</dc:creator><description /></item><item><title>re: Common Exception Types</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#403345</link><pubDate>Tue, 29 Mar 2005 16:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:403345</guid><dc:creator>Keith Hill</dc:creator><description>&amp;quot;I don't believe applications should be throwing ExecutionEngineException, StackOverflowException, or OutOfMemoryExceptions.&amp;quot;  &lt;br&gt;&lt;br&gt;+1 for that (except for injecting errors for testing).  I would also add NullReferenceException to that list and perhaps even InvalidCastException.</description></item><item><title>Some Quick Tidbits</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#431854</link><pubDate>Thu, 23 Jun 2005 12:52:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:431854</guid><dc:creator>Jesse Squire's Weblog</dc:creator><description /></item><item><title>Izņēmuma situāciju lietošana</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#7047121</link><pubDate>Thu, 10 Jan 2008 03:19:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7047121</guid><dc:creator>Ivara blogs</dc:creator><description>&lt;p&gt;&amp;amp;#352;odien &amp;amp;#160; Vakar Andrejs jau aizskāra tēmu, par kuru es jau pasen gribu uzrakstīt, bet kaut kā&lt;/p&gt;
</description></item><item><title>
	Liste over exceptions i .NET
</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#8337549</link><pubDate>Wed, 26 Mar 2008 13:11:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8337549</guid><dc:creator>
	Liste over exceptions i .NET
</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.todobom.dk/post/Liste-over-exceptions-i-NET.aspx"&gt;http://blog.todobom.dk/post/Liste-over-exceptions-i-NET.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>exception type 13</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#8808663</link><pubDate>Sun, 03 Aug 2008 00:56:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8808663</guid><dc:creator>exception type 13</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://abbie.getyourfreefitnessvideo.info/exceptiontype13.html"&gt;http://abbie.getyourfreefitnessvideo.info/exceptiontype13.html&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>iS34.Net G??ncel Haberler &amp;raquo; G??ncel Notlar</title><link>http://blogs.msdn.com/brada/archive/2005/03/27/402801.aspx#9496244</link><pubDate>Sat, 21 Mar 2009 22:07:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9496244</guid><dc:creator>iS34.Net G??ncel Haberler &amp;raquo; G??ncel Notlar</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.is34.net/guncel-notlar.html"&gt;http://www.is34.net/guncel-notlar.html&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>