Skip to content

Commit b11397d

Browse files
committed
Unbreak print-condition.
The API of io.aviso/pretty had changed. Some other drive-by fixes. Fixes #50.
1 parent 718266b commit b11397d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/active/clojure/condition.cljc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,13 @@
567567
(defn print-stack-trace-of
568568
[writer exception]
569569
(let [elements (map preformat-stack-frame (aviso-exception/expand-stack-trace exception))]
570-
(aviso-columns/write-rows writer [:formatted-name
571-
" "
572-
:file
573-
[#(when (:line %) ": ") :left 2]
574-
#(-> % :line str)]
575-
elements))))
570+
(binding [*out* writer]
571+
(aviso-columns/write-rows [:formatted-name
572+
" "
573+
:file
574+
[#(when (:line %) ": ") :left 2]
575+
#(-> % :line str)]
576+
elements)))))
576577

577578
#?(:clj
578579
(defn print-condition
@@ -583,7 +584,7 @@
583584
(.write (name type))
584585
(.write ": "))
585586
(cond
586-
(nil? message) (print "<no message>")
587+
(nil? message) (.write w "<no message>")
587588
(string? message) (let [^String s message]
588589
(.write w s))
589590
:else (print message))
@@ -592,7 +593,7 @@
592593
\space))]
593594
(when who
594595
(.write w " [")
595-
(print who)
596+
(.write w (str who))
596597
(.write w "]"))
597598
(binding [*print-length* 12]
598599
(doseq [irritant stuff]

0 commit comments

Comments
 (0)