Skip to content

add error forwarding #129

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

Closed
calvinmetcalf opened this issue Apr 23, 2015 · 12 comments
Closed

add error forwarding #129

calvinmetcalf opened this issue Apr 23, 2015 · 12 comments

Comments

@calvinmetcalf
Copy link
Contributor

add the ability to forward errors when we pipe, probably want it to be opt in at first, this would be both useful and in line with how whatwg streams work

@sonewman
Copy link
Contributor

+1, when we say error forwarding do we mean these errors would propagate up and down the chain?

@calvinmetcalf
Copy link
Contributor Author

Yeah working on a pull to io

On Sat, Apr 25, 2015, 4:14 AM Sam Newman [email protected] wrote:

+1, when we say error forwarding do we mean these errors would propagate
up and down the chain?


Reply to this email directly or view it on GitHub
#129 (comment)
.

@mikeal
Copy link

mikeal commented Apr 28, 2015

Do we still think this is a good idea?

We had planned to do this years ago but since then a lot of work has gone in to how we encapsulate errors, I wonder if this is still a good idea or not.

@wonderdogone
Copy link

As @calvinmetcalf mentioned this would keep node streams more in "sync" with whatwg streams no? And i think thats a good idea. Maybe a better question would be why would one not want to pass the error along? I suspect it would only increase usability.

@ivan
Copy link

ivan commented Sep 19, 2015

I don't think think it makes sense to forward end but not error. I'm using steams extensively in one project and have 21 calls to my pipeWithErrors helper, which is everywhere that I want to pipe something.

@yoshuawuyts
Copy link

@ivan I'm using pump to handle errors and close streams for me. It calls a cb with (error) if there was an error in any of the streams.

@yoshuawuyts
Copy link

Actually it might be a good idea to make pump's behavior an option in .pipe(). E.g. something like:

readable.pipe(writable, { chain: true })

Not sure if chain is the right word, but having a way to knit multiple streams together as if they were one would be super beneficial. I think pump pretty much nails it in that respect. Does anyone have opinions on this? Anything that should be done differently?

@goloroden
Copy link

@yoshuawuyts I like you idea :-). What about forwardErrors as key?

@yoshuawuyts
Copy link

I think short, memorable names might be better, forwardErrors feels a bit verbose.

@calvinmetcalf
Copy link
Contributor Author

so there are some problems with adding the option.

@BenoitClaveau
Copy link

+1

@mcollina
Copy link
Member

I think this is superseded by #283.

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

9 participants