Java methods are described with the usual name.space.ClassName.methodName convention and Clojure functions with their own name.space/function-name convention.
Anonymous clojure functions are denoted by adding an [fn] to their enclosing, named function.
"Caused by" cascades are shown as in regular java stack traces.
Elements are vertically aligned for better readability.
Printing is directed to *out*.
If you want to direct the printing to somewhere other than *out*, either use pst-on to specify the output location or pst-str to capture the printing as a string.
The library also offers an API for programatically 'parsing' exceptions. This API is used internal for pst and can be used to e.g. improve development tools. Try for example:
(use 'clj-stacktrace.core)
(try
("nofn")
(catch Exception e
(parse-exception e)))
Leiningen
If you use Leiningen, you can install clj-stacktrace on a user-wide
basis. Just add the following to ~/.lein/profiles.clj:
The :injections clause replaces the built-in stack trace printing
with enhanced clj-stacktrace version; you can leave it out if you plan
on invoking clj-stacktrace functions directly or are using tools which
are already clj-stacktrace-aware.
0 comments on commit
794f5f4