Free practice · matching · medium
Practice
Match exception boundaries
Match each risky operation to the focused failure it should handle.
Trusted input boundary
Business logic receives only validated, typed values
- PresenceRequired value supplied
- FormatAllowed external form
- ConvertFocused typed conversion
- RangeAllowed business limits
- UsePass checked value to logic
- ReportReturn useful safe failures
Presence, type, format, conversion, and range checks belong at a narrow boundary with useful failures and no hidden fallback.