Should a business rule violation throw an exception?

后端 未结 14 935
误落风尘
误落风尘 2021-02-04 04:18

Should a business rule violation throw an exception?

14条回答
  •  执笔经年
    2021-02-04 04:55

    Business rules could throw exception but they shouldn't.

    If you have another way to communicate information about common and predictable validation error, you should use it.

提交回复
热议问题