devongovett / browserify-istanbul

A browserify transform for the istanbul code coverage tool
50 stars 32 forks source link

Handle errors #3

Closed thebuilder closed 10 years ago

thebuilder commented 10 years ago

If an error is thrown the transform will catch it, instead of throwing an error and causing node to stop.

thebuilder commented 10 years ago

This was causing watchify to crash whenever it tried to compile a .js file with invalid syntax. Now it will emit an error that you can handle:

bundler.bundle(opts)
     .on('error', function(error) {
           handleErrors(error); 
     })
devongovett commented 10 years ago

Thanks!