title: How to catch all errors from browserify?
body: <p>I use the following gulp task</p>
  
  <pre><code>const gulp          = require('gulp');
  const browserify    = require('browserify');
  const watchify      = require('watchify');
  const source        = require('vinyl-source-stream');
  const gutil         = require('gulp-util');
  
  gulp.task('watchify', () =&gt; {
  
      var bundler = watchify(browserify('./test/app.js', {
              debug: true,
              fullPaths: true,
              paths: ['./src'],
              cache: {},
              packageCache: {}
          }))
      .on('update', bundle)
      .on('error', (error) =&gt; { gutil.log('[error]', error); });
  
      function bundle(){
          return bundler
              .bundle()
              .pipe(source('bundle.js'))
              .pipe(gulp.dest('./test/'));
      }
  
      return bundle();
  
  });
  </code></pre>
  
  <p>But today the browserify process hung without sending the error event, after hours of trail and error I found out it was because of something like this:</p>
  
  <pre><code>aFunction(argA, , argC);
  </code></pre>
  
  <p>(some work-in-progress code where I missed an argument in a function call)</p>
  
  <p><strong><em>My question is, how can I listen to these kind of errors more easily?</em></strong></p>
  
  <p>I could of course lint the files first but i'd also like to know if it's possible within browserify.</p>