Re: [fetch] Aborting a fetch (#27)

> where is the catch in your example?

I think you're suggesting this:

```js
async function fetchLike(url) {
  try {
    var response = await ajax(url);
    return response.text;
  }
  catch (err) {
    // ..
  }
}

fetchLike("http://some.url.1").then(..);
```

Of course, you can do that... but the `catch` clause here in no way shape or form could be invoked by the `.cancel(..)` call made down on the promise chain, unless you're suggesting conflating `cancel` with `throw`? The `catch` in this example is triggered if there's an error during `ajax(..)`, not from what happens with the outside promise chain.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/27#issuecomment-87714517

Received on Monday, 30 March 2015 15:01:12 UTC