ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

Crashes if error in transformers #5

Closed ForbesLindesay closed 11 years ago

ForbesLindesay commented 11 years ago

Identified in #2 by @alexeypetrushin

ForbesLindesay commented 11 years ago

Provided transformers handle errors properly by emitting an error event on the stream it works fine e.g.:

try {
  src = compile(file, data);
} catch (error) {
  this.emit('error', error);
}