     (apply action opts args)))
 
 (defn handle-exception
-  "Handle exceptions thrown from CLI actions."
+  "Handle exceptions thrown from CLI actions.
+
+  See:
+
+  * [[*include-program-in-errors*]]
+  * [[*rethrow-error*]]
+  * [[*log-error*]]"
   [e]
   (log/debugf "handle exception: <%s>" e)
   (let [msg (.getMessage e)]
     (if *log-error* (log/error e "action line parse error"))
-    (if (instance? java.io.FileNotFoundException e)
-      (binding [*out* *err*]
-        (println (format "%sio error: %s" (program-fmt) msg)))
-      (binding [*out* *err*]
+    (binding [*out* *err*]
+      (if (instance? java.io.FileNotFoundException e)
+        (println (format "%sio error: %s" (program-fmt) msg))
         (println (format "%serror: %s"
                          (program-fmt)
                          (if ex-data

  with [[multi-action-context]] or [[single-action-context]]"
  nil)

(defa- program-name-inst "prog")

(defn program-name

    (str (program-fmt) (first errors))
    (str "The following errors occurred while parsing your action:\n\n"
         (s/join \newline errors))))

(defn print-error-message
  "Print errors messages generated by [[error-message]]."
  [errors]
  (binding [*out* *err*]
    (println (error-msg errors))))

(defn- parse-single [action-context actions action action-key
                     arguments single-action-mode?
