Throwing exceptions in ASP.NET C#

后端 未结 3 1479
难免孤独
难免孤独 2021-02-04 00:40

Is there a difference between just saying throw; and throw ex; assuming ex is the exception you\'re catching?

3条回答
  •  别那么骄傲
    2021-02-04 01:07

    throw ex; will erase your stacktrace. Don't do this unless you mean to clear the stacktrace. Just use throw;

提交回复
热议问题