-
-
Save vemv/e9a7534a5bc7f277395add3e7c23a291 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/nedap/utils/spec/impl/check.cljc b/src/nedap/utils/spec/impl/check.cljc | |
index dc270bd..535b095 100644 | |
--- a/src/nedap/utils/spec/impl/check.cljc | |
+++ b/src/nedap/utils/spec/impl/check.cljc | |
@@ -35,7 +35,8 @@ | |
(pr-str spec-quoted#) | |
"\n\n-------------------------")) | |
true println) | |
- (throw (ex-info "Validation failed" {:spec spec-quoted# | |
- :faulty-value x-quoted# | |
- :explanation (~explain spec# x#)}))))) | |
+ (throw (cond-> (ex-info "Validation failed" {:spec spec-quoted# | |
+ :faulty-value x-quoted# | |
+ :explanation (~explain spec# x#)}) | |
+ ~cljs (~(if cljs 'js/Error. `Exception.))))))) | |
true)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment