We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When attaching a p/catch handler to a promise after a p/finally handler, it is rendered ineffective. Example:
p/catch
p/finally
(let [p (p/deferred) f (p/finally p #(prn :finally)) c (p/catch p identity)] (p/reject! p :boom) (p/handle c prn)) ;; output: :finally nil :boom
As you can see, c was (erroneously) rejected. This doesn't happen when swapping the handler attachments:
c
(let [p (p/deferred) c (p/catch p identity) f (p/finally p #(prn :finally))] (p/reject! p :boom) (p/handle c prn)) ;; output: :finally :boom nil
It also breaks when attaching the p/catch to the promise returned by p/finally:
(let [p (p/deferred) f (p/finally p #(prn :finally)) c (p/catch f identity)] (p/reject! p :boom) (p/handle c prn)) ;; output: :finally nil :boom
And it also works when attaching the p/finally to the promise returned by p/catch:
(let [p (p/deferred) c (p/catch p identity) f (p/finally c #(prn :finally))] (p/reject! p :boom) (p/handle c prn)) ;; output: :finally :boom nil
This relates to version 11.0.678. It still used to work as expected with version 8.0.450 (though I haven't tried any in between versions).
Hope that makes sense!
The text was updated successfully, but these errors were encountered:
Ah and this is using ClojureScript.
Sorry, something went wrong.
No branches or pull requests
When attaching a
p/catch
handler to a promise after ap/finally
handler, it is rendered ineffective. Example:As you can see,
c
was (erroneously) rejected. This doesn't happen when swapping the handler attachments:It also breaks when attaching the
p/catch
to the promise returned byp/finally
:And it also works when attaching the
p/finally
to the promise returned byp/catch
:This relates to version 11.0.678. It still used to work as expected with version 8.0.450 (though I haven't tried any in between versions).
Hope that makes sense!
The text was updated successfully, but these errors were encountered: