-
Notifications
You must be signed in to change notification settings - Fork 58
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
Promise rejection tracking events #96
Comments
@slightlyoff maybe you can comment and we could discuss on Wednesday? |
[Lightly] discussed on 12/16/2015 telecom. Raw notes: https://pad.w3ctag.org/p/16-12-2015-minutes.md |
Taken up at teleconference 16-Dec-2015: https://github.com/w3ctag/meetings/blob/gh-pages/2015/telcons/12-16-agenda.md |
@slightlyoff to write up something and attach to this issue with further description. |
Agreed to close pending Alex's comments. |
This event seems useful and, per discussion, has our support. @domenic informs me that the other proposal was to extend The IDL looks good and it's great to see it exposed on both windows and workers. Is the specified weak set of unhandled promise rejections exposed to script anywhere? If not, why are its semantics so tightly (un)specified? Lastly, it's unclear why the spec is explicit about when/where things are reported to developer consoles. It seems out of scope for normative text. |
The weak set is a tracking mechanism for what unhandledrejection events have been fired, basically, so that later rejectionhandled events can correspond to them. So the contents are exposed to script, somewhat indirectly. Does that help?
This was modeled after synchronous errors and the error event, which say:
I think I meant to consistify both of these to say "developer console" per whatwg/html#224 (comment) but I forgot to go back and change the onerror one. I'll do that now. |
One thing I was curious about (and seems to require digging a bit into the ECMA-262) is whether the promise attribute on the event is the last promise in the chain or the promise where the rejection happened (or was last handled). (Is there then a mechanism for developers to inspect that chain to understand what happened?) Re "developer console" wording; I think there is some value in consistency between implementations in terms of what gets reported to the developer console; I worry about race-to-the-bottom in terms of diagnostics to avoid having clutter for a site developed in a competing browser which then needs to be debugged in another browser (although this is more a fuzzy feeling than something I've properly gamed out in my head). |
Good question. It's the last promise in the chain, since previous promises in the chain are marked as handled the moment they get chained off of. |
Sorry, I missed
There is no telemetry-friendly method; you kind of have to hope your error was created with enough information, either in its |
Not sure the TAG feels this is in their wheelhouse, but if they do: https://html.spec.whatwg.org/multipage/webappapis.html#unhandled-promise-rejections
The text was updated successfully, but these errors were encountered: