2024年Clojure调查中分享您的观点!

欢迎!请参阅关于页面了解这个站点的工作方式。

0
错误

步骤

(require '[clojure.test :refer [is]]) (is (thrown-with-msg? Exception #"123" (throw (ex-info nil {}))))

预期:

在() (形式初始化1933636226458515246.clj:1) 中FAIL:预期 (thrown-with-msg? Exception #"123" (throw (ex-info nil {}))) 实际...

实际:

`
在() (Matcher.java:1283)
预期: (thrown-with-msg? Exception #"123" (throw (ex-info nil {})))
实际: java.lang.NullPointerException: null
在java.util.regex.Matcher.getTextLength (Matcher.java:1283)

java.util.regex.Matcher.reset (Matcher.java:309)
java.util.regex.Matcher.<init> (Matcher.java:229)
java.util.regex.Pattern.matcher (Pattern.java:1093)
clojure.core$re_matcher.invokeStatic (core.clj:4796)
clojure.core$re_find.invokeStatic (core.clj:4838)
clojure.core$re_find.invoke (core.clj:4838)
user$eval43312.invokeStatic (form-init1933636226458515246.clj:1)
user$eval43312.invoke (form-init1933636226458515246.clj:1)
clojure.lang.Compiler.eval (Compiler.java:7062)
clojure.lang.Compiler.eval (Compiler.java:7025)
clojure.core$eval.invokeStatic (core.clj:3206)
clojure.core$eval.invoke (core.clj:3202)
clojure.main$repl$read_eval_print__8572$fn__8575.invoke (main.clj:243)
clojure.main$repl$read_eval_print__8572.invoke (main.clj:243)
clojure.main$repl$fn__8581.invoke (main.clj:261)
clojure.main$repl.invokeStatic (main.clj:261)
clojure.main$repl.doInvoke (main.clj:177)
clojure.lang.RestFn.invoke (RestFn.java:1523)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__40865.invoke (interruptible_eval.clj:87)
clojure.lang.AFn.applyToHelper (AFn.java:152)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invokeStatic (core.clj:657)
clojure.core$with_bindings_STAR_.invokeStatic (core.clj:1965)
clojure.core$with_bindings_STAR_.doInvoke (core.clj:1965)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invokeStatic (interruptible_eval.clj:85)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:55)
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__40910$fn__40913.invoke (interruptible_eval.clj:222)
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__40905.invoke (interruptible_eval.clj:190)
clojure.lang.AFn.run (AFn.java:22)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
java.lang.Thread.run (Thread.java:748)

`

ClojureScript

在() (TypeError:NaN:NaN) 预期: (thrown-with-msg? js/Error #"123" (throw (ex-info nil {}))) 实际: #object[TypeError TypeError: re-find must match against a string.]

1 回答

0
参考: https://clojure.atlassian.net/browse/CLJ-2369 (由 alex+import 报告)
...