Skip to content
New issue

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

Overhaul rejection tracking #32

Open
bergus opened this issue Jul 13, 2016 · 0 comments
Open

Overhaul rejection tracking #32

bergus opened this issue Jul 13, 2016 · 0 comments

Comments

@bergus
Copy link
Contributor

bergus commented Jul 13, 2016

Currently error reporting does keep track of every Rejected instance.
ES7 promises (and afaik basically any other promise implementations) do however keep track of the promises (futures) that are rejected without handlers.
See tc39/ecma262#76 for more links.

The problem with Creed's current approach is that it does not detect branching. Consider the example

const p = reject();
const q = p.then();
const r = p.catch();

While Creed does report p to be handled, it should actually have reported q as unhandled in the first place.

This is not an easy problem for sure with the nearing approach, as with x = reject(…), y = new Future, z = new Future we would have to distinguish z.become(y); y.become(x) from z.become(x); y.become(x) (in any order).

Any thoughts?


I am not sure to what extent creed does use the standardised rejection tracking events, I kinda have lost track of proposals/implementations/specifications.
Btw, node has some nice tests here.
Also this issue will probably solve the matter of silencer being an Action, I'd expect silencing to see some major change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant