On Thu, Oct 9, 2014 at 4:57 PM, John Lenz <concavel...@gmail.com> wrote:
> or a simple utility method
>


Promise.reject could be used.

```js
asyncFunc()
.then(count => count >= 0 ? count : Promise.reject(new Error(...)))
.then(...)
.catch(...)
```

Nathan
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to