-Functions to deal with errors in bash.
+Functions to deal with errors in bash
bash-trace: print stack trace (best bash stack trace ever).
errcatch: on error, do stack trace ane exit
the err* functions depend on bash-trace.
-
For scripts without any nested function calls, this is usually sufficient:
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
-
-Related: see my bash script template repo.
+Related: see my bash script template repo, at https://iankelling.org/git.
Please email me if you have a patches, bugs, feedback, or republish this
somewhere else: Ian Kelling <ian@iankelling.org>.