print stacktrace in case of error

This commit is contained in:
jem 2020-02-16 14:50:53 +01:00
parent ea701e2a09
commit ce95d736cc

View file

@ -18,7 +18,8 @@
[cryogen-core.sitemap :as sitemap] [cryogen-core.sitemap :as sitemap]
[clojure.inspector :as inspector] [clojure.inspector :as inspector]
[cryogen-core.toc :as toc] [cryogen-core.toc :as toc]
[cryogen-core.hierarchic :as hierarchic]) [cryogen-core.hierarchic :as hierarchic]
[clojure.stacktrace :as strace])
(:import [java.util Locale] (:import [java.util Locale]
[java.net URI] [java.net URI]
[java.io File])) [java.io File]))
@ -620,4 +621,5 @@
(if (or (instance? IllegalArgumentException e) (if (or (instance? IllegalArgumentException e)
(instance? clojure.lang.ExceptionInfo e)) (instance? clojure.lang.ExceptionInfo e))
(println (red "Error:") (yellow (.getMessage e))) (println (red "Error:") (yellow (.getMessage e)))
(write-exception e)))))) (write-exception e))
(strace/print-stack-trace e)))))