Skip to content

Commit 85846bf

Browse files
committed
need to wrap cljs.js/eval-str *eval-fn* invoke in a try/catch
1 parent fa0da84 commit 85846bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/cljs/cljs/js.cljs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,11 @@
659659
[::ana/namespaces name])}]
660660
(when (:verbose opts)
661661
(debug-prn js-source))
662-
(cb {:ns ns :value (*eval-fn* evalm)})))))))))
662+
(let [res (try
663+
{:ns ns :value (*eval-fn* evalm)}
664+
(catch :default cause
665+
(wrap-error (ana/error aenv "ERROR" cause))))]
666+
(cb res))))))))))
663667
(:*cljs-ns* bound-vars))))
664668

665669
(defn eval-str

0 commit comments

Comments
 (0)