title: How to handle AppDomain.Unload and the related ThreadAbortException
body: <p>According to MSDN, AppDomain.Unload causes all threads inside the unloading AppDomain to throw a thread abort exception. </p>
  
  <blockquote>
    <p>The threads in domain are terminated using the Abort method, which
    throws a ThreadAbortException in the thread. Although the thread
    should terminate promptly, it can continue executing for an
    unpredictable amount of time in a finally clause. -- from <a href="http://msdn.microsoft.com/en-us/library/system.appdomain.unload.aspx" rel="nofollow">MSDN</a></p>
  </blockquote>
  
  <p>So my understanding then is that everytime i'm writing code anywhere that is expected to run in this AppDomain, I have to expect that a thread abort could happen on any thread at any time. Is this true? <strong>Should all code everywhere assume that a ThreadAbortException can be thrown at any time?</strong></p>
  
  <p>Practically <strong>this virtually elimates catch(Exception ex)</strong> because that would catch the ThreadAbortException and try to handle it, usually by logging an error that really shouldn't be logged (since unloading of AppDomain isn't really an exception). </p>
  
  <p>Are there any other considerations that need to be taken to avoid unecessary exception handling / error logging?</p>