You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the other hand, when using Readable from node:stream (instead of streamx), an uncaughtException is thrown. This is the correct behavior, else the error would be silently ignored, despite not being properly handled by users.
Additional information
node:stream.pipe() has some code to handle that specific situation.
The following does not raise an
uncaughtException
.On the other hand, when using
Readable
fromnode:stream
(instead ofstreamx
), anuncaughtException
is thrown. This is the correct behavior, else the error would be silently ignored, despite not being properly handled by users.Additional information
node:stream
.pipe()
has some code to handle that specific situation.https://github.com/nodejs/node/blob/8aac7da7d66fc0b1426d8bf1e7b3e7b7208885bd/lib/internal/streams/readable.js#L1020-L1028
This logic is absent from
streamx
.Related bugs
Gulp (which uses
streamx
) currently relies on anuncaughtException
being thrown. This is because it usesasync-done
, which usesnode:domain
, which intercepts uncaught exceptions.This leads to simple Gulp pipelines not handling errors properly, as described in gulpjs/gulp#2812
Solution
PR opened at #95.
The text was updated successfully, but these errors were encountered: