Permalink
Browse files

Fix outlier width calculation.

  • Loading branch information...
1 parent 94b07c4 commit 96ed744fb8c216421e3434a75463380541048168 @mmcgrana committed Apr 15, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/clj_stacktrace/repl.clj
@@ -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)))

0 comments on commit 96ed744

Please sign in to comment.