gulp-bundle-assets icon indicating copy to clipboard operation
gulp-bundle-assets copied to clipboard

How to catch watch stream errors?

Open sawyerh opened this issue 9 years ago • 1 comments

Forgive me if this is a noob question, I'm a little new when it comes to Gulp. I'm wondering if it's possible to catch errors that happen during a watch. I'm able to do this successfully like this:

gulp.src(config.src)
    .pipe(bundle())
    .on('error', handleErrors)
    ...

However, I'm not quite sure how to do it here:

bundle.watch({
    configPath: path.join(__dirname, '../bundle.config.js'),
    dest: path.join(__dirname, '../../public/assets')
});

sawyerh avatar May 06 '15 16:05 sawyerh