-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: error modes of writable #29745
doc: error modes of writable #29745
Conversation
6c6beba
to
b2c4f5a
Compare
5e422d0
to
b030cf2
Compare
b030cf2
to
212a54e
Compare
212a54e
to
b693344
Compare
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Could this get another review from nodejs/streams? |
@nodejs/streams |
doc/api/stream.md
Outdated
@@ -432,6 +432,18 @@ file.end('world!'); | |||
// Writing more now is not allowed! | |||
``` | |||
|
|||
[`stream.end()`][stream-end] will error with (in order of precedence): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify if it will throw or emit an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about now?
doc/api/stream.md
Outdated
@@ -619,6 +631,14 @@ write('hello', () => { | |||
|
|||
A `Writable` stream in object mode will always ignore the `encoding` argument. | |||
|
|||
`stream.write()` will error with (in order of precedence): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
Co-Authored-By: Yorkie Liu <yorkiefixer@gmail.com>
doc/api/stream.md
Outdated
@@ -619,6 +632,15 @@ write('hello', () => { | |||
|
|||
A `Writable` stream in object mode will always ignore the `encoding` argument. | |||
|
|||
`stream.write()` will call it's callback and emit `'error'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`stream.write()` will call it's callback and emit `'error'` | |
`stream.write()` will call its callback and emit `'error'` |
Co-Authored-By: Denys Otrishko <9109612+lundibundi@users.noreply.github.com>
This PR seems to document how does the |
Sorry, I don't understand. Do you think you could try to rephrase? |
Never mind, I'm not proposing any changes on this PR. FYI, I was considering that it's easy to forget to update here when someone changed the algorithm of write/end in our streams. |
@yorkie @lundibundi Can this PR get your approvals and maybe land? |
ping @mcollina |
Co-Authored-By: Denys Otrishko <9109612+lundibundi@users.noreply.github.com>
Currently blocked by whatever happens with #29197 which affects some details of this. |
This needs a rebase. |
The error modes of streams is still a fluid situation so I think it's better re-open this at a future stage. |
Documents the error modes of
Writable
Checklist