Stream
errorHandler
errorHandler
Description | Type | Returns |
---|---|---|
All stream errors use this function as callback | Function | Function |
defaultOptions.errorHandler = function(title) {
return function(err) {
nodePlugins.util.log(nodePlugins.util.colors.red('[' + title + ']'), err.toString());
nodePlugins.util.beep();
_.isFunction(this.emit) && this.emit('end');
};
};
gulp.src(src)
.pipe($.sourcemaps.init())
.pipe($.coffeelint())
.pipe($.coffeelint.reporter())
.pipe($.coffee()).on('error', options.errorHandler('CoffeeScript'));
Updated less than a minute ago