better docs
authorIan Kelling <iank@fsf.org>
Mon, 22 Jul 2019 19:58:00 +0000 (15:58 -0400)
committerIan Kelling <iank@fsf.org>
Mon, 22 Jul 2019 19:58:00 +0000 (15:58 -0400)
err

diff --git a/err b/err
index 14253062d09bedcd6872b16d313e7a6850421fce..580183ca6d430b0a882403e44d39cb069de23b15 100644 (file)
--- a/err
+++ b/err
 # 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
@@ -91,6 +86,13 @@ err-catch() {
   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
 #######################################
@@ -113,7 +115,7 @@ err-print() {
 
 
 #######################################
-# On error, print stack trace
+# Print stack trace and exit
 #
 # Use this instead of the exit command to be more informative.
 #