Re: [webrtc-tests] Adding a basic no-media call that uses promises. (#1824)

PTAL. I used a long then-chain with a terminating "catch", and a variable global to the chain to keep track of which step in the chain went "boom". (I dislike trying to use line numbers for this.)

It seems to me that with long promise-chains, per-step error handling is a Bad Idea, because the error handler can't tell whether it got its error from the function it's guarding or a previous step - and there's no way to abort the chain and cause something else to happen, given that throwing will just get you the next step's error handler.

In this case, a .catch at the end seems fit-for-purpose.

View on GitHub: https://github.com/w3c/web-platform-tests/pull/1824#issuecomment-102980923

Received on Monday, 18 May 2015 08:58:22 UTC