-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add option to continue streaming on error #12
Conversation
I've actually been working on replacing Does that sound reasonable? |
Even better. Any helping hands appreciated/wanted? Or are you almost through with it anyway? |
Thanks! I've got the switch to |
Released switch to through2 as v2.4.0. |
This still crashes when throwing an error. I guess instead of calling the try {
file.contents = new Buffer(template(context));
} catch (err) {
this.emit('error', err);
} |
@backflip I'll get the error handling updated, but even so, you'll need to use var gulp = require('gulp'),
plumber = require('gulp-plumber'),
hb = require('gulp-hb');
gulp.task('html', function () {
return gulp
.src('./src/**/*.hbs')
.pipe(plumber())
.pipe(hb())
.pipe(gulp.dest('./web'));
});
gulp.task('watch', function () {
gulp.watch('./src/**/*.hbs', ['html']);
}); |
Improved error handling published as v2.4.2 |
Perfect, thanks!
|
Currently, the stream ends when an error occurs. This is undesirable when having a watch process running, e.g.
A solution is to use the
failures
option ofmap-stream
which was added for this case: dominictarr/map-stream#7What do you think?