Skip to content

Rule 12 Predictable failures are typed

Edward Baitsewe edited this page Nov 9, 2026 · 1 revision

Rule 12: A failure the business can predict is not exceptional

Part two: modelling. Expected rule-breaking gets its own named exception and a clear message. Real breakdowns are handled differently.

The short form of every rule is in BUILD_PHILOSOPHY.md, which is the version that counts. This page is the long form: why, where it shows today, and when not to use it.

Why

"This email address already has an account" and "the database is gone" are different kinds of problem. Handling both with catch (\Exception) turns every problem into "something went wrong", and the person cannot do anything about it.

Where it shows in Slim Killer

When not to apply it

Inside a spike, a plain exception is fine. The rule is for core.

Words

Domain exception, boundary. See Glossary.

Learn more

Advanced Domain Architecture & Tactical DDD, Rule 5 in its course philosophy, taught in module 4, domain exception trees. Course page.


Build philosophy

Clone this wiki locally