From 0684119000e6c615c210883e919b10d6cf3560e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rahu=CE=BB=20D=C3=A9?= Date: Wed, 28 Sep 2022 19:18:35 +0530 Subject: [PATCH] Mark bb.edn load exception (#1378) * Mark bb.edn load exception * print to stderr * print with binding --- src/babashka/main.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/babashka/main.clj b/src/babashka/main.clj index e5bd9b4b..6b19dc77 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -1049,7 +1049,9 @@ Use bb run --help to show this help output. (catch java.lang.RuntimeException e (if (re-find #"No dispatch macro for: \"" (.getMessage e)) (throw (ex-info "Invalid regex literal found in EDN config, use re-pattern instead" {})) - (throw e))))) + (do (binding [*out* *err*] + (println "Error during loading bb.edn:")) + (throw e)))))) (defn main [& args] (let [[args global-opts] (parse-global-opts args)