Skip to content

Commit

Permalink
Merge af50b01 into 6fd4ad8
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathon McKitrick committed Jul 17, 2015
2 parents 6fd4ad8 + af50b01 commit c1b5703
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cider/nrepl/middleware/stacktrace.clj
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@
from its message and discard the string representation of its inner cause."
[{:keys [class] :as cause}]
(if (= class "clojure.lang.Compiler$CompilerException")
(update-in cause [:message] str/replace
#".* (compiling:)\((.*)\)" "Error $1 $2")
(let [re #".* (compiling:)\(([^:]*):(\d+):(\d+)\)"
[_ label source line column] (re-matches re (:message cause))]
(assoc (update-in cause [:message] str/replace re
(str "Error " label " " source " line " line " col " column))
:source source
:line line
:column column))
cause))

;; CLJS REPLs use :repl-env to store huge amounts of analyzer/compiler state
Expand Down

0 comments on commit c1b5703

Please sign in to comment.