ApplicationException or create custom exceptions?

前端 未结 4 1350
天涯浪人
天涯浪人 2021-01-18 02:12

In my file repository, I will throw the following exceptions when the InsertFile() method is called:

  • When the upload file size limit is exceeded
4条回答
  •  无人及你
    2021-01-18 03:03

    Well what you have so far is alright, but I'd personally throw a System.ArgumentException (with a detailed message) instead.

提交回复
热议问题