title: Why watch task terminate in gulp already use gulp-plumber plugin?
body: <p>I try to use this plugin in gulp (gulp-plumber).I studied about this plugin that it gives you error but it watching state not stop.In other words it gives your file error on command line.But it not stop watching .
  <a href="https://www.npmjs.com/package/gulp-plumber" rel="nofollow">https://www.npmjs.com/package/gulp-plumber</a></p>
  
  <p>But when I changed in sass file try to create error on saas file ,then it stop watch then Again i need to give command why ?</p>
  
  <p>here id my gulp file.</p>
  
  <pre><code>var gulp = require('gulp');
  //require sass package
  var sass = require('gulp-sass');
  var rename = require('gulp-rename');
  var minifyCss = require('gulp-minify-css');
  var uglify = require('gulp-uglify');
  var concat = require('gulp-concat');
  var plumber = require('gulp-plumber');
  
  
  
  
  // Compile Our Sass
  gulp.task('sass', function () {
      return gulp.src('scss/*.scss')
          .pipe(sass())
          .pipe(plumber())
          .pipe(gulp.dest('css'));
  });
  // css miifilcation
  gulp.task('minify-css',['sass'], function () {
      return gulp.src('css/*.css')
          .pipe(minifyCss())
          .pipe(plumber())
          .pipe(rename({suffix: '.min'}))
          .pipe(gulp.dest('dist'));
  });
  
  // js minifiction
  gulp.task('compress', function() {
      return gulp.src('app/**/*.js')
          .pipe(uglify())
          .pipe(gulp.dest('jdist'));
  });
  
  //concatination of js files
  
  gulp.task('scripts', function() {
      return gulp.src('jdist/**/*.js')
          .pipe(concat('all.js'))
          .pipe(rename({suffix: '.min'}))
          .pipe(gulp.dest('dist/'));
  });
  
  
  // Watch Files For Changes
  gulp.task('watch', function () {
      gulp.watch('scss/*.scss', ['sass','minify-css']);
  });
  
  gulp.task('default', ['sass', 'watch', 'minify-css','scripts']);
  </code></pre>
  
  <p>these are following steps I did.</p>
  
  <ul>
  <li>Write gulp in command line</li>
  <li>change in sass file .remove one <strong>'{</strong> in saas file then it give the error and terminate why ?</li>
  </ul>
  
  <p>here is my log</p>
  
  <pre><code>Microsoft Windows [Version 6.1.7601]
  Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
  
  D:\Webapplication\DemoApp&gt;gulp
  [09:11:47] Using gulpfile D:\Webapplication\DemoApp\gulpfile.js
  [09:11:47] Starting 'sass'...
  [09:11:47] Starting 'watch'...
  [09:11:47] Finished 'watch' after 9.13 ms
  [09:11:47] Starting 'scripts'...
  [09:11:47] Finished 'sass' after 53 ms
  [09:11:47] Starting 'minify-css'...
  [09:11:47] Finished 'minify-css' after 27 ms
  [09:11:47] Finished 'scripts' after 61 ms
  [09:11:47] Starting 'default'...
  [09:11:47] Finished 'default' after 7.5 µs
  [09:13:23] Starting 'sass'...
  
  events.js:141
        throw er; // Unhandled 'error' event
        ^
   Error: scss\home.scss
  Error: Invalid CSS after "}": expected "}", was ""
          on line 28 of stdin
  &gt;&gt; }
     ^
  
      at options.error (D:\Webapplication\DemoApp\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:277:32)
  
  D:\Webapplication\DemoApp&gt;
  </code></pre>
  
  <p>update Question after answer.I apply your answer .it is not terminating but after it is also not watching  way?</p>
  
  <pre><code>Microsoft Windows [Version 6.1.7601]
  Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
  
  D:\Webapplication\DemoApp&gt;gulp
  [10:43:28] Using gulpfile D:\Webapplication\DemoApp\gulpfile.js
  [10:43:28] Starting 'watch'...
  [10:43:28] Finished 'watch' after 20 ms
  [10:43:28] Starting 'default'...
  [10:43:28] Finished 'default' after 7.11 µs
  [10:43:42] Starting 'sass'...
  [10:43:42] Finished 'sass' after 32 ms
  [10:43:42] Starting 'minify-css'...
  [10:43:42] Finished 'minify-css' after 30 ms
  [10:43:49] Starting 'sass'...
  [10:43:49] Plumber found unhandled error:
   Error in plugin 'gulp-sass'
  Message:
      scss\home.scss
  Error: Invalid CSS after "}": expected "}", was ""
          on line 28 of stdin
  &gt;&gt; }
     ^
  
  Details:
      formatted: Error: Invalid CSS after "}": expected "}", was ""
          on line 28 of stdin
  &gt;&gt; }
     ^
  
      column: 1
      line: 28
      file: stdin
      status: 1
      messageFormatted: scss\home.scss
  Error: Invalid CSS after "}": expected "}", was ""
          on line 28 of stdin
  &gt;&gt; }
     ^
  </code></pre>