[CLJ-1932] Add clojure.spec/explain-str to return explain output as a string Created: 25/May/16 Updated: 26/May/16 Resolved: 26/May/16
|Affects Version/s:||Release 1.9|
|Fix Version/s:||Release 1.9|
Currently explain prints to *out* - add a function explain-str that returns the explain output as a string.
|Comment by Alex Miller [ 25/May/16 9:51 AM ]|
You can easily capture the string with (with-out-str (s/explain spec data)).
|Comment by Alex Miller [ 26/May/16 8:35 AM ]|
explain-str was added in https://github.com/clojure/clojure/commit/575b0216fc016b481e49549b747de5988f9b455c for 1.9.0-alpha3.