Skip to content

Commit 53224ff

Browse files
committed
msg
1 parent 1e6155c commit 53224ff

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/compojure/api/meta.clj

+8-4
Original file line numberDiff line numberDiff line change
@@ -910,9 +910,11 @@
910910
_ (when context?
911911
(when-not safely-static
912912
(when (and static? (not (-> info :public :static)))
913-
(let [coach (or (some-> (System/getProperty "compojure.api.meta.static-context-coach")
914-
edn/read-string)
915-
{:default :print})
913+
(let [coach (some-> (System/getProperty "compojure.api.meta.static-context-coach")
914+
edn/read-string)
915+
_ (assert (map? coach)
916+
(str "-Dcompojure.api.meta.static-context-coach should be a map, given: "
917+
(pr-str coach)))
916918
nsym (ns-name *ns*)
917919
mode (or (get coach nsym)
918920
(get coach :default)
@@ -926,7 +928,9 @@
926928
"use (context ... :static true ...)."
927929
"\n\n"
928930
"To suppress this message for this namespace use -Dcompojure.api.meta.static-context-coach="
929-
"{" nsym :off "}")]
931+
"{" nsym :off "}"
932+
(when coach
933+
(str "\n\nCurrent coach config: " (pr-str coach))))]
930934
(case coach
931935
:off nil
932936
:print (println msg)

0 commit comments

Comments
 (0)