Permalink
Browse files

defensive coding to stop blowing up when there's nothing in trace-ele…

…ms for the cause
  • Loading branch information...
1 parent fb11426 commit 6854616a9e21da36d8d055d7972649149f7e0f69 @jonpither jonpither committed May 31, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/clj_stacktrace/repl.clj
View
4 src/clj_stacktrace/repl.clj
@@ -96,8 +96,8 @@
(map (comp count source-str))
(sort)
(utils/fence))]
- (if-let [cause (:cause excp)]
- (max this-source-width (find-source-width cause))
+ (if (not-empty (-> excp :cause :trace-elems))
+ (max this-source-width (find-source-width (:cause excp)))
this-source-width)))
(defn pst-on [on color? e]

0 comments on commit 6854616

Please sign in to comment.