Andreas Sinz
06/13/2016, 5:43 PMfun parseCreditCardNumber(number: String): CreditCardNumber
in one of your BOs. When invoked by the UI with user input, the CreditCardNumber can be wrong. When using data from a DB as the argument, you know that it must not fail. I'd use an unchecked exception there. The UI knows that the exception can happen and catches it and tells the user to try again. If it happens with data from a DB, it is fatal