- From: Dan Dascalescu via GitHub <sysbot+gh@w3.org>
- Date: Tue, 11 Oct 2016 22:49:00 +0000
- To: public-media-capture@w3.org
dandv has just created a new issue for https://github.com/w3c/mediacapture-image: == Rejecting promises vs throwing == After [the change from ImageCaptureError to DOMException](https://github.com/w3c/mediacapture-image/pull/93) (which has "also rewritten the 4 method's descriptions to be more Promise-based and homogeneous"), I'd have to update [the polyfill](https://github.com/dandv/imagecapture) to throw a new `DOMException` if the stream is not `live`, but reject in case of other operational errors. Any reason for this inconsistency which goes again [common recommendations](http://exploringjs.com/es6/ch_promises.html#_tips-for-error-handling)? > For operational errors, each function should support exactly one way of signaling errors. For Promise-based functions that means not mixing rejections and exceptions, which is the same as saying that they shouldn’t throw exceptions. Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/94 using your GitHub account
Received on Tuesday, 11 October 2016 22:49:08 UTC