On Wed, Nov 12, 2014 at 11:08 AM, Axel Rauschmayer <[email protected]> wrote: > Is that true, though? Couldn’t a finalizer or something similar check > (before a promise is garbage collected) whether all errors have been > handled?
A finalizer can do this check. This will flag some uncaught exceptions, but not promptly. And as I wrote above, that's only part of the issue -- promises can also be kept alive for an indefinite period of time, but never end up either handling their exceptions or becoming unreachable. This could also be an error. That is, liveness is one way to tell that an exception will never be handled, but it is only an approximation. And it's not necessarily an error to not handle an exception -- `Promise.race()` is expected to have this behavior as a matter of course, for example. We've been through this discussion many times before. Eventually there may be a `Promise#done`. But the consensus was that the first step was to give the devtools folks time to make good UI for showing the dynamic "unhandled async exception" state of a program, and see how well that worked. --scott ps. some of the discussed language features threaten to release zalgo. but i'll not open up that can of worms. _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

