principles:fail_fast
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:fail_fast [2015-11-12 20:13] – [Rationale] 24.224.252.66 | principles:fail_fast [2020-10-12 16:11] – old revision restored (2013-02-05 18:03) 159.69.186.191 | ||
---|---|---|---|
Line 24: | Line 24: | ||
===== Rationale ===== | ===== Rationale ===== | ||
- | When a failure remains undetected, it propagates through the system ultimately causing other modules to fail. This results in in a more complicated fault removal. Furthermore undesired side effects like corrupted files may occur. A crashed program clearly communicates that there is a problem and is often a better situation than a misbehaving program. | + | Then a failure remains undetected, it propagates through the system ultimately causing other modules to fail. This results in in a more complicated fault removal. Furthermore undesired side effects like corrupted files may occur. A crashed program clearly communicates that there is a problem and is often a better situation than a misbehaving program. |
Line 32: | Line 32: | ||
* Throw an Exception. | * Throw an Exception. | ||
* Use assertions. | * Use assertions. | ||
- | |||
- | |||
- | ===== Caveats ===== | ||
- | |||
- | FF reveals problems which are already present in the system. For a system with only a few problems, this is good as the remaining faults are identified and fixed more easily. But applying FF to a system that has many problems may decrease reliability further as problems which were hidden, show up, produce error messages and lead to system aborts. | ||
- | |||
- | See also section [[#contrary principles]]. | ||
Line 73: | Line 66: | ||
{{page> | {{page> | ||
- | ===== Examples | + | ===== Example |
Line 91: | Line 84: | ||
* Joshua Bloch: // | * Joshua Bloch: // | ||
- | ===== Discussion ===== | ||
- | |||
- | Discuss this wiki article and the principle on the corresponding [[talk: |
principles/fail_fast.txt · Last modified: 2021-10-18 21:33 by christian