W3C home > Mailing lists > Public > public-webcrypto@w3.org > March 2014

Re: WebIDL usage for Algorithms

From: Alexey Proskuryakov <ap@webkit.org>
Date: Tue, 11 Mar 2014 10:30:41 -0700
Cc: Richard Barnes <rlb@ipv.sx>, Mark Watson <watsonm@netflix.com>, "public-webcrypto@w3.org" <public-webcrypto@w3.org>
Message-id: <3402BE9A-01A1-43DE-9E71-0AF433D0F5D5@webkit.org>
To: Ryan Sleevi <sleevi@google.com>

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:22 UTC