store/[org.clojure/clojure "1.8.0"] clj::clojure.repl/pst

Official Documentation

Add notes
Arities
==================================================
   []
   [e-or-depth]
   [e depth]

Docstring
==================================================
  Prints a stack trace of the exception, to the depth requested. If none supplied, uses the root cause of the
  most recent repl exception (*e), and a depth of 12.

Source

(defn pst
  "Prints a stack trace of the exception, to the depth requested. If none supplied, uses the root cause of the
  most recent repl exception (*e), and a depth of 12."
  {:added "1.3"}
  ([] (pst 12))
  ([e-or-depth]
     (if (instance? Throwable e-or-depth)
       (pst e-or-depth 12)
       (when-let [e *e]
         (pst (root-cause e) e-or-depth))))
  ([^Throwable e depth]
     (binding [*out* *err*]
       (println (str (-> e class .getSimpleName) " "
                     (.getMessage e)
                     (when-let [info (ex-data e)] (str " " (pr-str info)))))
       (let [st (.getStackTrace e)
             cause (.getCause e)]
         (doseq [el (take depth
                          (remove #(#{"clojure.lang.RestFn" "clojure.lang.AFn"} (.getClassName %))
                                  st))]
           (println (str \tab (stack-element-str el))))
         (when cause
           (println "Caused by:")
           (pst cause (min depth
                           (+ 2 (- (count (.getStackTrace cause))
                                   (count st))))))))))

Example 1

Edit
(require '[clojure.repl :refer [pst]])

(pst)
;; => nil

(/ 1 0)
;; Prints
;; > ArithmeticException Divide by zero  clojure.lang.Numbers.divide (Numbers.java:156)

(pst)
;; Prints
;; > ArithmeticException Divide by zero
;; > clojure.lang.Numbers.divide (Numbers.java:156)
;; > clojure.lang.Numbers.divide (Numbers.java:3691)
;; > user/eval13 (NO_SOURCE_FILE:7)
;; > clojure.lang.Compiler.eval (Compiler.java:6619)
;; > clojure.lang.Compiler.eval (Compiler.java:6582)
;; > clojure.core/eval (core.clj:2852)
;; > clojure.main/repl/read-eval-print--6588/fn--6591 (main.clj:259)
;; > clojure.main/repl/read-eval-print--6588 (main.clj:259)
;; > clojure.main/repl/fn--6597 (main.clj:277)
;; > clojure.main/repl (main.clj:277)
;; > clojure.main/repl-opt (main.clj:343)
;; > clojure.main/main (main.clj:441)
;; 
;; => nil

Uses on crossclj