-
Notifications
You must be signed in to change notification settings - Fork 58
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
pass error from stream #46
Conversation
Fix `.start(array)`
Modified the onAll example to have the correct arity. For unknown reasons in the example the onAll method was being passed the orchestrator instance in addition to the callback.
Update README.md
travis only supports the last stable, the current stable, and the current unstable.
Update Travis and David DM URLs and use SVG badges
This one's a hard one. Sometimes emitting |
Can you use |
I can, and that's what you've done in your PR, but if the task is not really done yet, bad things happen -- even though the callback was only called once. Imagine that the clean task errors, you handle it, but it's not done yet. Then the build task kicks off and first sees if the target dir exists then fills it. It checks that it exists, and it does (clean hasn't finished yet), then clean actually finishes deleting the dir, then build tries to write a file into the dir. Boom -- write to a folder that doesn't exist. What actually failed? Clean lasted longer than you expected. |
I think we should exit the process if clean task catch a error, not continuing to run the build task. Now we can't catch the error because of stream will not emit the The only thing I can do is handle the stream directly, but I don't think this's a good way.
|
Due to the fact that plugins generally don't behave consistently with respect to events around errors, I've been planning to handle each plugin's error event manually -- something that I am loathe to do, but in order to figure out where a fairly long stream goes bad and opt for the outcome that I want on a case by case basis, it seems like the only way. Would be great if there was some way to set a flag when you invoke a plugin that specified how you wanted stream errors to be handled, but this would involve gulp or orchestrator inserting itself into streams all over the place to help me with such a flag's instruction... so I'm pretty much resigned to it. |
@stu-salsbury We have an issue open for this already |
A fix for this has been published as |
stream will not emit end when emit error
You can review the testcase, it will not emit task_err/err using the origin code.