Skip to content

Commit

Permalink
Fix outlier width calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcgrana committed Apr 15, 2010
1 parent 94b07c4 commit 96ed744
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/clj_stacktrace/repl.clj
Expand Up @@ -83,9 +83,10 @@
"Returns the width of the longest source-string among all trace elems of the
excp and its causes."
[excp]
(let [this-source-width
(utils/high (map (memfn length)
(map source-str (:trace-elems excp))))]
(let [this-source-width (utils/fence
(sort
(map #(.length %)
(map source-str (:trace-elems excp)))))]
(if-let [cause (:cause excp)]
(max this-source-width (find-source-width cause))
this-source-width)))
Expand Down

0 comments on commit 96ed744

Please sign in to comment.