summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-14 09:01:58 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-14 09:01:58 +0100
commit65af756fc33ce1a8960c690e681d12ebeef20750 (patch)
treec73bfe2798e681a7d846e274891686b86c539365 /include
parent19f1e0083d5077d972bfb0352bbbd06a3cd6b72f (diff)
x/xx: slightly more verbose error messages
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-xinclude/err.sh11
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()