...
- To stop execution immediately when an error is detected
- Have the last line of the log file describe the fatal error (easy to tail)
- Make it easy to frequently check for errors of different sorts in our code
- Report the check being done (even when successful) in order to leave "bread crumbs" in the log file for troubleshooting.
- Report all diagnostics to standard error so it will not interfere , for example, with a functions function's standard output that is meant to be captured by the caller
- i.e.This way, if a function performs reports error checks to standard error, and also reports information on standard output, only the standard output will be captured by backtick or parentheses evaluation.
...