Exception Handling - exclude an exception typehttp://forums.asp.net/t/1790834.aspx/1?Exception+Handling+exclude+an+exception+typeMon, 14 May 2012 21:27:37 -040017908344923356http://forums.asp.net/p/1790834/4923356.aspx/1?Exception+Handling+exclude+an+exception+typeException Handling - exclude an exception type <p>I have one policy set up to handle all exception types...</p> <p>&lt;exceptionPolicies&gt;</p> <p>&nbsp; &nbsp; &lt;add name=&quot;MyExceptionPolicy&quot;&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;exceptionTypes&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;add name=&quot;All Exceptions&quot; type=&quot;System.Exception&quot; ... postHandlingAction=&quot;NotifyRethrow&quot;&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/add&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/exceptionTypes&gt;</p> <p>&nbsp; &nbsp; &lt;/add&gt;</p> <p>&lt;/exceptionPolicies&gt;</p> <p></p> <p>What if I want to ignore Thread Abort Exceptions? Would I add the following to exceptionTypes? Thank you for your time.</p> <p><br class="Apple-interchange-newline"> &nbsp; &nbsp; &nbsp; &nbsp;&lt;exceptionTypes&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;add name=&quot;All Exceptions&quot; type=&quot;System.Exception&quot; ... postHandlingAction=&quot;NotifyRethrow&quot;&gt;<br class="Apple-interchange-newline"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;add name=&quot;Thread Abort Exceptions&quot; type=&quot;System.Threading.ThreadAbortException&quot; ... postHandlingAction=&quot;None&quot;&gt;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/add</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/exceptionTypes&gt;</p> 2012-04-09T16:07:11-04:004980524http://forums.asp.net/p/1790834/4980524.aspx/1?Re+Exception+Handling+exclude+an+exception+typeRe: Exception Handling - exclude an exception type <p></p> <blockquote><span class="icon-blockquote"></span> <h4>prefersgolfing</h4> want to ignore Thread Abort Exceptions? Would I add the following to exceptionTypes?</blockquote> <p></p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>prefersgolfing</h4> &lt;add name=&quot;All Exceptions&quot; type=&quot;System.Exception&quot; ... postHandlingAction=&quot;NotifyRethrow&quot;&gt;<br class="Apple-interchange-newline"> </blockquote> <p></p> <p>AllExceptions [System.Exception] throws Thread Abort Exception. In order to avoid specific exception simply avoid All Exceptions AND add other indivual exceptions that should be considered to exception policy.</p> <p>Refer <a href="http://msdn.microsoft.com/en-us/library/ff647154.aspx">http://msdn.microsoft.com/en-us/library/ff647154.aspx</a></p> <p>Download 'Hands on Labs with walk through tutorials at <a href="http://www.microsoft.com/en-us/download/details.aspx?id=6932"> http://www.microsoft.com/en-us/download/details.aspx?id=6932</a></p> 2012-05-14T21:27:37-04:00