diff options
author | Leah Rowe <leah@libreboot.org> | 2023-10-14 09:01:58 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-10-14 09:01:58 +0100 |
commit | 65af756fc33ce1a8960c690e681d12ebeef20750 (patch) | |
tree | c73bfe2798e681a7d846e274891686b86c539365 | |
parent | 19f1e0083d5077d972bfb0352bbbd06a3cd6b72f (diff) |
x/xx: slightly more verbose error messages
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | include/err.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/err.sh b/include/err.sh index 416c69af..12bba8fb 100755 --- a/include/err.sh +++ b/include/err.sh @@ -4,10 +4,17 @@ version=""; versiondate=""; projectname="" x_() { - [ $# -lt 1 ] || ${@} || err "non-zero exit status: ${@}" + [ $# -lt 1 ] || ${@} || err_exit err ${@} } xx_() { - [ $# -lt 1 ] || ${@} || fail "non-zero exit status: ${@}" + [ $# -lt 1 ] || ${@} || err_exit fail ${@} +} + +err_exit() +{ + _fail="${1}" && shift 1 + echo "Non-zero exit: $@" + $_fail "Unhandled error" } check_git() |