From adf206031dd0351eca353cccc4de30e6c1fa0584 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Mon, 18 Oct 2021 21:13:36 -0400 Subject: [PATCH] simpler catchall error message the previous 'trap' etries are useful for debugging, but probably have too much information for an end user --- kaya | 2 +- kaya-client | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kaya b/kaya index 3583863..582f73c 100755 --- a/kaya +++ b/kaya @@ -21,7 +21,7 @@ if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4 set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR +trap 'echo "kaya: backup failed" >&2' ERR # first stable version of API between kaya and kaya-client diff --git a/kaya-client b/kaya-client index f8e2ff6..83ec93f 100755 --- a/kaya-client +++ b/kaya-client @@ -21,7 +21,7 @@ if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4 set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR +trap 'echo "kaya-client: backup failed" >&2' ERR read -r kaya_protocol_version -- 2.25.1