O'Reilly logo

Domain Modeling Made Functional by Scott Wlaschin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Domain Errors

Software systems are complex, and we can’t handle every conceivable error using types like this, nor would we want to. So before we do anything else, let’s come up with a consistent approach to classifying and handling errors.

We can classify errors into three groups:

  • Domain Errors. These are errors that are to be expected as part of the business process and therefore must be included in the design of the domain, such as an order that is rejected by billing or an order that contains an invalid product code. The business will already have procedures in place to deal with this kind of thing, and the code will need to reflect these processes.

  • Panics. These are errors that leave the system in an unknown state, such as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required