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

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