ClojureCLR v2.7 Release Notes
-
🖨 There have been enhancements in how the REPL prints values without a 🖨 print-method, specifically Throwable and the fallthrough Object case. 🖨 Both cases now print in a tagged literal data form that can be read by the reader.
🖨 Unhandled objects print with the class, hash code, and toString:
user=> *ns* #object[clojure.lang.Namespace 0x55aa628 "user"]
0️⃣ Thrown exceptions will still be printed in the normal way by the default 🖨 REPL but printing them to a stream will show a different form:
user=> (/ 1 0) ArithmeticException Divide by zero clojure.lang.Numbers.divide (Numbers.java:158) user=> (println *e) #error { :cause Divide by zero :via [{:type java.lang.ArithmeticException :message Divide by zero :at [clojure.lang.Numbers divide Numbers.java 158]}] :trace [[clojure.lang.Numbers divide Numbers.java 158] [clojure.lang.Numbers divide Numbers.java 3808] ;; ... elided frames ]}
➕ Additionally, there is a new function available to obtain a Throwable as map data:
Throwable->map
.