Skip to content

Commit

Permalink
Merge pull request #165 from shmish111/master
Browse files Browse the repository at this point in the history
improved try-either function
  • Loading branch information
committed Mar 30, 2016
2 parents 218d574 + d49f386 commit 69c8da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cats/monad/either.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -327,5 +327,5 @@
;; detect compilation of a cljs namespace and inject the appropriate error
;; see https://groups.google.com/forum/#!topic/clojurescript/iBY5HaQda4A
(if (:ns &env)
`(try (right ~@body) (catch js/Error e# (left e#)))
`(try (right ~@body) (catch Exception e# (left e#))))))
`(try (right (do ~@body)) (catch js/Error e# (left e#)))
`(try (right (do ~@body)) (catch Exception e# (left e#))))))

0 comments on commit 69c8da3

Please sign in to comment.