-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Implement a better error handler #121
Comments
Would be cool to have something similar to https://github.com/adametry/gulp-eslint gulp.src(src)
.pipe(babel())
.pipe(babel.format()) |
@tomsotte I guess giving the user, chance to work around error event is better than just logging and not throwing an error. User may need to do something when error event is fired. I am also doing it the same way you are while working with watchers. |
@hereisnaman what I am proposing does not exclude your use case, it's an addition, it just eases the logging of the error, which it seems to me is the most common case for the compilation of sass. |
I agree that we need a better error handler. It should not automatically log errors but simply give the user the ability to add its own custom handler. Not stopping in watch-mode could be a specific option. |
It is in fact what I'm proposing, a nifty addition that does not change in any way the current implementation. |
I wanted to make a gulp watch task, but every time it stopped when an error were found.
Since I've searched but found no real workaround, the only solution I found was to handle the error like
gulp-sass
does. It does not interrupt the watch and just report it on the console.Solution source: https://github.com/dlmanning/gulp-sass/blob/master/index.js#L178
An easy implementation for whoever has problem with it is:
The text was updated successfully, but these errors were encountered: