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

后端 未结 5 2257
旧时难觅i
旧时难觅i 2021-02-20 01:31
catch (ThreadAbortException)
{ }
catch (Exception ex)
{
    TraceManager.TraceException(ex,
                                (int)ErrorCode.GENERIC_EXCEPTION,
                    


        
5条回答
  •  粉色の甜心
    2021-02-20 02:01

    It will be caught and lost. You should really only be catching exceptions that you can do something with or that you log and then rethrow (with throw; not throw new [some exception];).

提交回复
热议问题