(CLJS) A "finally" in a "try" in a "go" block is skipped in f a string is thrown.

Description

In ClojureScript a "finally" is ignored if a string is thrown and the enclosing "try" is in a "go" block.

Example code:

(ns demo
(:require-macros
[cljs.core.async.macros :refer [go]]))

;; Prints: "in a finally"
(go (try (throw (ex-info "THROWN" nil)) (finally (println "in a finally"))))

;; Prints: "in a finally"
(go (try (throw (js/Exception. "THROWN")) (finally (println "in a finally"))))

;; Prints: "in a finally"
(go (try (throw (#js {})) (finally (println "in a finally"))))

;; Prints: "in a finally"
(try (throw "THROWN") (finally (println "in a finally")))

;; Prints: nothing
(go (try (throw "THROWN") (finally (println "in a finally"))))

Environment

org.clojure/clojure "1.8.0"
org.clojure/clojurescript "1.9.229"
org.clojure/core.async "0.3.442"

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Priority

Major
Configure