- From: Domenic Denicola <notifications@github.com>
- Date: Fri, 14 Oct 2016 10:26:47 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Friday, 14 October 2016 17:28:35 UTC
The pattern we've been using for that is to put
```
const error1 = new Error('error1');
error1.name = 'error1';
```
at the top of the file (plus maybe error2 if you have multiple errors and want to distinguish), then later doing
```js
return promise_rejects(t, error1, writer.write(), 'err message');
```
--
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/pull/540#issuecomment-253866872
Received on Friday, 14 October 2016 17:28:35 UTC