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

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


        
5条回答
  •  既然无缘
    2021-02-20 01:45

    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

提交回复
热议问题