Alex Rivera | Logout

Does it make sense to catch ThreadAbortException and perform no action?

Asked 2011-01-10T21:14:39.267
17
catch (ThreadAbortException)
{ }
catch (Exception ex)
{
    TraceManager.TraceException(ex,
                                (int)ErrorCode.GENERIC_EXCEPTION,
                                ex.StackTrace + "\n" + ex.Message + "\n" + VendorUrl);
}

does it make sense to even have the

catch (ThreadAbortException)
{ }

or will that cause the ThreadAbortException to be swallowed and lost forever?

Edit
Report

1 Answer

0

If you want to do something specific for different kind of exceptions then it makes since to have seperate catch blocks. Otherwise you can just use the one Exception catch

answered 2011-01-10T21:20:00.860

Your Answer