package file→ .shtukbase/packages/code-deep-modules/judges/errors-out.md
judges/errors-out.md
15 lines, 835 B.
- # Judge: errors are designed out
- Norm DM-R04. The interface is chosen so that there are as few special cases and exceptions as possible; errors that can be avoided by definition are not thrown outward.
- **Who judges.** The reviewer of the change.
- **When.** On a change where new errors, exceptions, failure codes or special cases appeared in an interface.
- **What the judge looks at.**
- 1. Can the operation be defined so that this case is a normal result (an empty list, "already done", a default value).
- 2. Is handling of one error not multiplied across all callers: can it be caught in one place higher up.
- 3. Real failures are not hidden by this: what the caller must know, the caller learns (the norm on failing loudly is in the code-unix package).
- **Result.** "holds" or "violated: which special case can be removed and how".