Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

stream: pipe should not call cleanup on handled error #6808

Closed
floatdrop opened this issue Jan 6, 2014 · 2 comments
Closed

stream: pipe should not call cleanup on handled error #6808

floatdrop opened this issue Jan 6, 2014 · 2 comments

Comments

@floatdrop
Copy link

If user is able to handle error (or attached on('error', ...) handler on stream - then we should not call cleanup on piped streams.

I think this two lines should be in reverse order.

We encountered this problem inside this tasks: gulpjs/gulp#91 and gulpjs/gulp#75

@juliangruber
Copy link
Member

The semantics of a stream's error event are that it went berzerk and can't continue operating. And that is good for the common case. What you might want to do is emit warning events, or any other event without predefined semantics, and then implement your own handling.

@floatdrop
Copy link
Author

Thank you, pretty clear explanation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants