2024 Clojure状态调查! 中分享您的想法。

欢迎!请查看关于页面以了解更多关于工作原理的信息。

0
core.async

ClojureScript 1.10.520,在Clojure中无法复现。在core.async 1.3.610和1.1.582中复现,在1.0.567中无法复现。

看起来和https://clojure.atlassian.net/browse/ASYNC-198?focusedCommentId=12026一样。

代码

(ns app.main
  (:require [clojure.core.async :as a]))

(a/go
  (try
    (prn :ret
         (try
           (throw (ex-info "expected" {}))

           (catch js/Error e
             (prn :catch1)
             (throw e))

           (finally
             (prn :finally))))

    (catch js/Error _e
      (prn :catch2))))

预期

:catch1
:finally
:catch2

实际

:catch1
:finally
:ret #error {:message "expected", :data {}}

1 答案

0

单行复现
clojure -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"} org.clojure/core.async {:mvn/version "1.3.610"}}}' -m cljs.main -re node -e "(require '[clojure.core.async :refer [go]]) (go (try (try (throw (ex-info "err" {:ex 42})) (catch js/Error e (throw e)) (finally (prn :finally))) (catch js/Error e (prn :catch2))))"

我测试了{clj,cljs} x {with-go,without-go},只在工作在带有gocljs上。

感谢你的报告,跟踪这里https://clojure.atlassian.net/browse/ASYNC-232
...