Re-throw errors in Clojure, for easier debugging.
This commit is contained in:
parent
661e7ed123
commit
bceee3b5fb
1 changed files with 2 additions and 1 deletions
|
@ -31,9 +31,10 @@
|
||||||
(->
|
(->
|
||||||
(datomish.pair-chan/go-pair ~@body)
|
(datomish.pair-chan/go-pair ~@body)
|
||||||
(cljs.core.async/take! (fn [[v# e#]]
|
(cljs.core.async/take! (fn [[v# e#]]
|
||||||
(cljs.test/is (= e# nil))
|
(cljs.test/is (= e# nil)) ;; Can't synchronously fail.
|
||||||
(done#))))))
|
(done#))))))
|
||||||
(clojure.test/deftest
|
(clojure.test/deftest
|
||||||
~(with-meta name {:async true})
|
~(with-meta name {:async true})
|
||||||
(let [[v# e#] (clojure.core.async/<!! (datomish.pair-chan/go-pair ~@body))]
|
(let [[v# e#] (clojure.core.async/<!! (datomish.pair-chan/go-pair ~@body))]
|
||||||
|
(when e# (throw e#)) ;; Assert nil just to be safe, even though we should always throw first.
|
||||||
(clojure.test/is (= e# nil))))))
|
(clojure.test/is (= e# nil))))))
|
||||||
|
|
Loading…
Reference in a new issue