Topic: Again about business process exceptions (2017)
How now, already came to a common opinion on this question or not? Earlier there were 2 camps, first of which was pro (especially many representatives in Java-environment), the second against. Reached to ... The Classical example, remittance into the account: long Transfer (int toAccount, decimal amount); Function returns transfer number if it is successful. And if it is not successful - there is an exception. What if for the account it is not enough money? To throw out exception NotEnoughMoneyException or to envelop result in a wrapper where there will be a return code (type successfully - means 0, and-100500 - means there is no money)? How prefers to do the majority?