W3C home > Mailing lists > Public > public-webrtc@w3.org > September 2016

[webrtc-pc] "Throw a FooError" steps not written in a consistent manner

From: Taylor Brandstetter via GitHub <sysbot+gh@w3.org>
Date: Fri, 30 Sep 2016 23:09:20 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-180420138-1475276959-sysbot+gh@w3.org>
taylor-b has just created a new issue for 
https://github.com/w3c/webrtc-pc:

== "Throw a FooError" steps not written in a consistent manner ==
I've seen the following:

- "throw a FooError."
- "[throw](http://heycam.github.io/webidl/#dfn-throw) a FooError." 
(which is the example wording suggested in WebIDL)
- "then throw a FooError exception and abort these steps."
- "throw a FooError and abort these, and all further steps."

And for promises, we have:

- "reject _p_ with FooError, and abort these steps"
- "reject _p_ with a DOMException object whose name attribute has the 
value FooError, and abort these steps"
- "reject _p_ with a DOMException object whose name attribute has the 
value FooError and stop processing any more steps"
- "reject _p_ with a DOMException object that has a name of FooError, 
and abort these steps"

Which formats do we want to use consistently?

For throwing an exception, I'd suggest:
> "[throw](http://heycam.github.io/webidl/#dfn-throw) a FooError."

The link makes it clear what this means, and "abort these steps" is 
redundant since it's implied that steps are aborted when an exception 
is thrown.

And for rejecting a promise, I'd suggest:

> "reject _p_ with a newly 
[created](https://heycam.github.io/webidl/#dfn-create-exceptio) 
FooError and abort these steps." 

This also uses wording suggested in WebIDL, and it's pretty 
short/sweet/to-the-point.

Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/845 using your GitHub account
Received on Friday, 30 September 2016 23:09:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:49 UTC