Skip to content

Commit

Permalink
fix: cljs error message impl
Browse files Browse the repository at this point in the history
  • Loading branch information
armed committed Jun 25, 2022
1 parent 6f1b8d4 commit 7d6180e
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/k16/gx/beta/impl.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,17 @@

(defn error-message
[ex]
(if (string? ex)
ex
(->> ex
(iterate ex-cause)
(take-while some?)
(mapv ex-message)
(interpose "; ")
(apply str))))
#?(:clj (->> ex
(iterate ex-cause)
(take-while some?)
(mapv ex-message)
(interpose "; ")
(apply str))
:cljs (cond
(instance? cljs.core/ExceptionInfo ex)
(ex-message ex)

(instance? js/Error ex)
(ex-message ex)

:else ex)))

1 comment on commit 7d6180e

@vercel
Copy link

@vercel vercel bot commented on 7d6180e Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gx – ./

gx-git-master-kepler16.vercel.app
gx-kepler16.vercel.app
gx.kepler16.com

Please sign in to comment.