Uh oh!
There was an error while loading. Please reload this page.
doc: error event is optionally emitted after .destroy() - #26589
Conversation
Uh oh!
There was an error while loading. Please reload this page.
vsemozhetbyt
commented
Mar 11, 2019
Trott
commented
Mar 11, 2019
"optionally" makes it sound like it's an option chosen by the user, but this really means "emit an 'error' event if there is an error", right? Just a suggestion for improvement but not blocking this change. What is here is already an improvement over what's currently in the docs now. |
@Trott good catch! that's true, it's not about user to decide whether or not emit this event. In this case even if you pass |
tadjik1
commented
Mar 13, 2019
Working on #26638 I've realised that in some situations streams are not emitting |
`error` event on each kind of stream is optionally emitted when `.destroy()` method is called. It depends on `._destroy()` implementation. In default implementation this event will no be fired unless `error` parameter has been provided. It was already mentioned for `writable.destroy([error])`, so I just copied same sentence for the other streams.
mcollina
commented
Mar 13, 2019
cc @nodejs/streams |
vsemozhetbyt
commented
Mar 19, 2019
vsemozhetbyt
commented
Mar 19, 2019
Landed in 78162ad |
`error` event on each kind of stream is optionally emitted when `.destroy()` method is called. It depends on `._destroy()` implementation. In default implementation this event will no be fired unless `error` parameter has been provided. It was already mentioned for `writable.destroy([error])`, so I just copied same sentence for the other streams. PR-URL: #26589 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`error` event on each kind of stream is optionally emitted when `.destroy()` method is called. It depends on `._destroy()` implementation. In default implementation this event will no be fired unless `error` parameter has been provided. It was already mentioned for `writable.destroy([error])`, so I just copied same sentence for the other streams. PR-URL: nodejs#26589 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`error` event on each kind of stream is optionally emitted when `.destroy()` method is called. It depends on `._destroy()` implementation. In default implementation this event will no be fired unless `error` parameter has been provided. It was already mentioned for `writable.destroy([error])`, so I just copied same sentence for the other streams. PR-URL: #26589 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
errorevent on each kind of stream is optionally emitted when.destroy()method is called. It depends on._destroy()implementation. In default implementation this event will no be fired unlesserrorparameter has been provided.It was already mentioned for
writable.destroy([error]), so I just copied same sentence for the other streams.Checklist