- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Wed, 8 Oct 2014 10:07:18 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Andrew Wilson <atwilson@google.com>, WHATWG List <whatwg@whatwg.org>, Jake Archibald <jaffathecake@gmail.com>, Peter Beverloo <beverloo@google.com>, Jonas Sicking <jonas@sicking.cc>
On Wed, Oct 8, 2014 at 9:51 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > The question is whether it's not natural to assume that *if the promise > fulfills*, that means they got permission. This allows them to do things > like using Promise.all() to join multiple permission requests together and > get a nice combined promise that fulfills when everything succeeds, or write > a nice straight success path that assumes permission, and then handle any > errors, including denied permission, at the end, rather than interleaving > error-handling logic into the middle of your code. Okay, given that question I agree it's natural to assume that this happens when it resolves. However, a user declining permission is not exceptional behavior and therefore should not cause an exception. In synchronous code you would not want to write try/catch here. -- https://annevankesteren.nl/
Received on Wednesday, 8 October 2014 08:07:47 UTC