title: How can I detect a ThreadAbortException in a finally block? (.NET)
body: <p>I have some critical logic in a finally block (with an empty try block), because I want to guarantee that the code gets executed even if the thread is aborted. However, I'd also like to detect the ThreadAbortException. I've found that wrapping my critical try/finally block in a try/catch does not catch the ThreadAbortException. Is there any way to detect it?</p>
  
  <pre>
  try {
      try { }
      finally {
          // critical logic
      }
  } catch(Exception ex) {
      // ThreadAbortException is not caught here, but exceptions thrown
      // from within the critical logic are
  }
  </pre>