Skip to content

Commit

Permalink
CLJS-3019: Error->map should produce qualified symbols for :type
Browse files Browse the repository at this point in the history
  • Loading branch information
mfikes committed Jun 23, 2020
1 parent 25c9587 commit 92707a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/cljs/cljs/repl.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
[o]
(let [base (fn [t]
(merge {:type (cond
(instance? ExceptionInfo t) 'ExceptionInfo
(instance? ExceptionInfo t) `ExceptionInfo
(instance? js/Error t) (symbol "js" (.-name t))
:else nil)}
(when-let [msg (ex-message t)]
Expand Down
4 changes: 4 additions & 0 deletions src/test/cljs/cljs/repl_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
(deftest test-cljs-3017
(let [m (cljs.repl/Error->map (js/TypeError.))]
(is (= 'js/TypeError (get-in m [:via 0 :type])))))

(deftest test-cljs-3019
(let [m (cljs.repl/Error->map (ex-info "" {}))]
(is (= 'cljs.core/ExceptionInfo (get-in m [:via 0 :type])))))

0 comments on commit 92707a0

Please sign in to comment.