From b00260d59e35e2e35fe97e4b3cbdf20685a5afb9 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 23 Apr 2014 00:36:11 -0700 Subject: [PATCH] improve doc --- errcatch-function | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/errcatch-function b/errcatch-function index 0a92c1a..14ebe33 100644 --- a/errcatch-function +++ b/errcatch-function @@ -13,7 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -catcherr() { # Exit on all errors. Print useful information. +# General purpose bash error handling setup +# Exit on all errors. Print useful information. +catcherr() { set -eE; trap 'echo "${BASH_COMMAND:+BASH_COMMAND=\"$BASH_COMMAND\" } ${FUNCNAME:+FUNCNAME=\"$FUNCNAME\" }${LINENO:+LINENO=\"$LINENO\" }\$?=$?"' ERR -- 2.25.1