Re: [whatwg/streams] pipeTo(): Rationale for propagating an error happened during error prpopagation to pipePromise (#558)

Hmm. Let's concentrate on only one scenario so I don't have to keep saying cancel/abort. So consider

```js
const rs = new ReadableStream({
  start(c) {
    c.enqueue(1);
    c.error(error1);
  }
});

const ws = new WritableStream({
  abort(err) {
    throw error2;
  }
});
```

To me the `abort(err)` handler is kind of like a `catch`-and-rethrow clause. By default it will "rethrow" the error passed in. But since `error2` is encountered while handling `error1`, the outer caller (i.e. the caller of `pipeTo`) instead sees `error2`.

Does that help?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/558#issuecomment-256172541

Received on Tuesday, 25 October 2016 20:54:25 UTC