Skip to content
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

With more than 2 pipeline stages, errors from middle stages are not bubbled. #22

Open
dimfeld opened this issue Feb 12, 2016 · 0 comments

Comments

@dimfeld
Copy link

dimfeld commented Feb 12, 2016

I'm not sure if there's anything you can reasonably do about this without getting even deeper into the stream internals, but a documentation update would be great so future people don't fall into this trap. I ran into this on Node 5.6.0. Here's a simple workaround:

var output = input.pipe(otherStage).pipe(outputStage);
var d = duplexer(input, output);
// This next line is necessary, or else exceptions from otherStage get lost.
otherStage.on('error', function(e) { d.emit('error', e); });

EDIT: To clarify, what I see is that Node does detect the error, but it quits without any sort of message so it's difficult to find the cause of the process ending unexpectedly.

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

No branches or pull requests

1 participant