purescript-contrib/gulp-purescript — pull request #6 by pelotom (2014-07-05 08:10:56+00:00)
Title: Avoid empty error messages

This fixes a problem where `psc` and `docgen` throw errors while throwing errors. That is, if a compilation error occurs during `psc` for example, we emit an error using `new gutil.PluginError(PLUGIN, buffer.toString())`, but `buffer.toString()` is null, so we get this error:

```
Error: Missing error message
at new PluginError (/Users/tom/code/purescript-d3-examples/node_modules/gulp-purescript/node_modules/gulp-util/lib/PluginError.js:53:28)
at ChildProcess. (/Users/tom/code/purescript-d3-examples/node_modules/gulp-purescript/index.js:94:38)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Socket. (child_process.js:968:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
```

which can't be handled and causes gulp to exit. This is especially annoying when trying to use `gulp watch`.

The fix makes `psc` and `docgen` do the same thing as `pscMake`; that is, give a static failure message.