Throwing exceptions in ASP.NET C#

后端 未结 3 1476
难免孤独
难免孤独 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:10

    You have two options throw; or throw the orginal exceptional as an innerexception of a new exception. Depending on what you need.

提交回复
热议问题