Skip to content

Commit

Permalink
Alignment for frames
Browse files Browse the repository at this point in the history
  • Loading branch information
derekmansen committed Dec 18, 2011
1 parent 7ccb981 commit 29f72f7
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/swank/core.clj
Expand Up @@ -2,9 +2,9 @@
(:use (swank util commands)
(swank.util hooks)
(swank.util.concurrent thread)
(swank.core connection hooks threadmap))
(:require (swank.util.concurrent [mbox :as mb])
(clj-stacktrace core repl)))
(swank.core connection hooks threadmap)
(clj-stacktrace core repl))
(:require (swank.util.concurrent [mbox :as mb])))

;; Protocol version
(defonce protocol-version (atom "20100404"))
Expand Down Expand Up @@ -119,17 +119,13 @@ values."
(some #(identical? debug-abort-exception %) (exception-causes t)))

(defn- exception-str [width elem]
(let [out (java.io.StringWriter.)]
(do
(clj-stacktrace.repl/pst-elems-on
out
false
[(clj-stacktrace.core/parse-trace-elem elem)]
width)
(.toString out))))
(pst-elem-str
false
(parse-trace-elem elem)
width))

(defn exception-stacktrace [t]
(let [width (clj-stacktrace.repl/find-source-width (clj-stacktrace.core/parse-exception t))]
(let [width (find-source-width (parse-exception t))]
(map #(list %1 %2 '(:restartable nil))
(iterate inc 0)
(map #(exception-str width %) (.getStackTrace t)))))
Expand Down

0 comments on commit 29f72f7

Please sign in to comment.