- From: Alexey Proskuryakov <ap@webkit.org>
- Date: Tue, 11 Mar 2014 10:30:41 -0700
- To: Ryan Sleevi <sleevi@google.com>
- Cc: Richard Barnes <rlb@ipv.sx>, Mark Watson <watsonm@netflix.com>, "public-webcrypto@w3.org" <public-webcrypto@w3.org>
11 μΰπςΰ 2014 γ., β 9:11, Ryan Sleevi <sleevi@google.com> νΰοθρΰλ(ΰ): > I do not believe we've agreed upon asynchronous for *ALL* WebIDL errors, which I have also previously communicated. It certainly is not what WebKit or Blink have implemented, and certainly not how I proposed to you that we resolve this. I think that the point about not making authors implement dual error handling is valid. Again, if we as a group disagree with recommendations in <https://github.com/domenic/promises-unwrapping/blob/master/docs/writing-specifications-with-promises.md>, it's probably worth trying to get those recommendations updated. Promise-Returning Functions Should Never Throw Promise-returning functions should never synchronously throw errors, since that would force duplicate error-handling logic on the consumer. Even argument validation errors are not OK. Instead, they should return rejected promises. For WebIDL-based specs, this will require fixes to WebIDL, which are underway. (See also W3C bug #21740.) - WBR, Alexey Proskuryakov
Received on Tuesday, 11 March 2014 17:32:01 UTC