Skip to content

Commit

Permalink
Add file name to compiler exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrand committed Jul 29, 2024
1 parent f392a20 commit 13fc997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clj/src/cljd/compiler.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -3406,7 +3406,7 @@
(throw
(if-some [stack (::emit-stack (ex-data e))]
(ex-info (ex-message e) (assoc (ex-data e) ::emit-stack (conj stack x)) (ex-cause e))
(ex-info (str "Error while compiling " (pr-str x)) {::emit-stack [x]} e))))))
(ex-info (str "Error while compiling " *file* " " (pr-str x)) {::emit-stack [x]} e))))))

(defn host-eval
[x]
Expand Down Expand Up @@ -3456,7 +3456,7 @@
(throw
(if-some [stack (::emit-stack (ex-data e))]
(ex-info (ex-message e) (assoc (ex-data e) ::emit-stack (conj stack x)) (ex-cause e))
(ex-info (str "Error while host-compiling " (pr-str x)) {::emit-stack [x]} e)))))))
(ex-info (str "Error while host-compiling " *file* " " (pr-str x)) {::emit-stack [x]} e)))))))

(defn emit-test [expr env]
(binding [*locals-gen* {}
Expand Down

0 comments on commit 13fc997

Please sign in to comment.