From 22b99cc9fd90ccbee720ba196f0874083feec679 Mon Sep 17 00:00:00 2001 From: Paul Legato Date: Tue, 29 Jul 2014 15:47:42 -0700 Subject: [PATCH] Print compile error stacktraces as they occur --- src/leiningen/compile.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/leiningen/compile.clj b/src/leiningen/compile.clj index e693f624..ed12a692 100644 --- a/src/leiningen/compile.clj +++ b/src/leiningen/compile.clj @@ -127,7 +127,11 @@ Code that should run on startup belongs in a -main defn." (let [form `(doseq [namespace# '~namespaces] (binding [*out* *err*] (println "Compiling" namespace#)) - (clojure.core/compile namespace#)) + (try + (clojure.core/compile namespace#) + (catch Throwable t# + (.printStackTrace t#) + (throw t#)))) project (update-in project [:prep-tasks] (partial remove #{"compile"}))] (try (eval/eval-in-project project form)