Permalink
Browse files

Reverting "Remove pst-str; use with-out-str instead."

Need to wait for a full version bump to do this.

This reverts commit f28bb79.
  • Loading branch information...
1 parent 6c88770 commit efb73bee4fecfb072c253ebbbf9e04db5b2a2fb4 @technomancy technomancy committed Sep 25, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/clj_stacktrace/repl.clj
View
7 src/clj_stacktrace/repl.clj
@@ -116,6 +116,13 @@
[& [e]]
(pst-on *out* false (or e *e)))
+(defn pst-str
+ "Like pst, but returns a string instead of printing that string to *out*"
+ [& [e]]
+ (let [sw (java.io.StringWriter.)]
+ (pst-on sw false (or e *e))
+ (str sw)))
+
(defn pst+
"Like pst, but with ANSI terminal color coding."
[& [e]]

0 comments on commit efb73be

Please sign in to comment.