Skip to content

Change internal error to user facing error on writer double close#128

Merged
jasnell merged 1 commit intomainfrom
jsnell/writablestream-internalerror-on-double-close
Oct 26, 2022
Merged

Change internal error to user facing error on writer double close#128
jasnell merged 1 commit intomainfrom
jsnell/writablestream-internalerror-on-double-close

Conversation

@jasnell
Copy link
Collaborator

@jasnell jasnell commented Oct 25, 2022

const ws = new WritableStream();
const writer = ws.getWriter();
writer.close();
writer.close();

... would cause an internal error when it needed to be a user-facing error.

```
const ws = new WritableStream();
const writer = ws.getWriter();
writer.close();
writer.close();
```

... would cause an internal error when it needed to be a user-facing
error.
Copy link
Contributor

@Warfields Warfields left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jasnell jasnell merged commit 077d464 into main Oct 26, 2022
@jasnell jasnell deleted the jsnell/writablestream-internalerror-on-double-close branch October 26, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants