principleMajorpending
Fail fast -- surface errors early and loudly
Viewed 0 times
fail fastassertpreconditionearly errorsilent failurevalidation
Problem
Silently swallowing errors or using fallback values deep in the code makes bugs invisible. The symptom appears far from the cause, making debugging extremely difficult.
Solution
Validate inputs at system boundaries and fail immediately with clear errors. Do not catch exceptions only to log and continue. Do not return default values when the real value is required. Assert preconditions at function entry. If something is wrong, stop execution and report it. The cost of a crash is lower than the cost of silent corruption.
Why
Every layer of error suppression adds distance between cause and symptom. Failing fast keeps them close together, making debugging trivial.
Revisions (0)
No revisions yet.