Skip to content

Commit

Permalink
Use catch :default in browser repl and reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonbloom authored and swannodette committed Feb 20, 2014
1 parent a7f7ea3 commit 203d853
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cljs/clojure/browser/repl.cljs
Expand Up @@ -28,7 +28,7 @@
"Process a single block of JavaScript received from the server"
[conn block]
(let [result (try {:status :success :value (str (js* "eval(~{block})"))}
(catch js/Error e
(catch :default e
{:status :exception :value (pr-str e)
:stacktrace (if (.hasOwnProperty e "stack")
(.-stack e)
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/clojure/reflect.cljs
Expand Up @@ -5,7 +5,7 @@

(defn- evaluate-javascript [block]
(let [result (try (js* "eval(~{block})")
(catch js/Error e
(catch :default e
(.log js/console e)))]
result))

Expand Down

0 comments on commit 203d853

Please sign in to comment.