# runs err-catch. See the README file for a slightly longer explanation.
-#######################################
-# Undoes err-catch. turns off exit and stack trace on error.
-#######################################
-err-allow() {
- set +E +o pipefail; trap ERR
-}
-
-
#######################################
# Print stack trace
#
# usage: err-bash-trace [FRAME_START]
#
+# This function is called by the other functions which print stack
+# traces.
+#
# It does not show function args unless you first run:
# shopt -s extdebug
-# which err-catch & err-print does for you.
+# which err-catch & err-print do for you.
#
# FRAME_START The frame to start printing on. default=0. Useful when
# printing from an ERR trap function to avoid printing
set -o pipefail
}
+#######################################
+# Undoes err-catch. turns off exit and stack trace on error.
+#######################################
+err-allow() {
+ set +E +o pipefail; trap ERR
+}
+
#######################################
# On error, print stack trace
#######################################
#######################################
-# On error, print stack trace
+# Print stack trace and exit
#
# Use this instead of the exit command to be more informative.
#