Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clojure repl-caught and pst printing after applying https://dev.clojure.org/jira/browse/CLJ-2373
(comment "interop runtime exception repl-caught")
(/ 1 0)
ArithmeticException Divide by zero clojure.lang.Numbers.divide (Numbers.java:163)
(comment "interop runtime exception pst")
(pst)
ArithmeticException Divide by zero
clojure.lang.Numbers.divide (Numbers.java:163)
clojure.lang.Numbers.divide (Numbers.java:3833)
;; elided
(comment "ex-info repl-caught")
(throw (ex-info "oops" {:a 1 :b "foo"}))
ExceptionInfo oops
ex-data keys: [:a, :b] clojure.core/ex-info (core.clj:4754)
(comment "ex-info pst")
(pst)
ExceptionInfo oops
ex-data keys: [:a, :b]
clojure.core/ex-info (core.clj:4754)
clojure.core/ex-info (core.clj:4754)
;; elided
(comment "macroexpand spex exception repl-caught")
(let [a])
CompilerException ExceptionInfo, compiling:(NO_SOURCE_PATH:9:1), Call to clojure.core/let did not conform to spec.
In: [0] val: () fails spec: :clojure.core.specs/bindings at: [:args :bindings :init-expr] predicate: any?, Insufficient input
(comment "macroexpand spec exception pst")
(pst)
CompilerException ExceptionInfo, compiling:(NO_SOURCE_PATH:13:1)
clojure.lang.Compiler.checkSpecs (Compiler.java:6898)
clojure.lang.Compiler.macroexpand1 (Compiler.java:6914)
;; elided
Caused by:
ExceptionInfo In: [0] val: () fails spec: :clojure.core.specs/bindings at: [:args :bindings :init-expr] predicate: any?, Insufficient input
clojure.core/ex-info (core.clj:4754)
clojure.core/ex-info (core.clj:4754)
;; elided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment