Skip to content
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

How to catch watch stream errors? #53

Open
sawyerh opened this issue May 6, 2015 · 1 comment
Open

How to catch watch stream errors? #53

sawyerh opened this issue May 6, 2015 · 1 comment
Milestone

Comments

@sawyerh
Copy link

sawyerh commented May 6, 2015

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')
});
@chmontgomery
Copy link
Contributor

Unfortunately that's not currently possible. An api enhancement would be necessary to bundle.watch to add an onError handler, similar to the change proposed in this issue.

I accept PRs, otherwise I'll try to get to it when I have time.

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

No branches or pull requests

2 participants