catch (ThreadAbortException)
{ }
catch (Exception ex)
{
TraceManager.TraceException(ex,
(int)ErrorCode.GENERIC_EXCEPTION,
Calling Thread.Abort
on a thread effectively sets a flag which will cause a ThreadAbortException
to be thrown any time code isn't processing that exception nor associated finally
blocks. Catching the exception without calling Thread.ResetAbort()
will simply result in the runtime throwing another ThreadAbortException
at its next opportunity. Such behavior is not completely meaningless, however, since it will cause all inner finally
blocks to run to completion before the exception can be seen by outer exception-filter blocks. Whether or not that is a good thing will depend upon the application.