Return error code if report contains error

Repeat of https://github.com/plumberjs/plumber-cli/pull/3 but based on https://github.com/plumberjs/plumber-cli/pull/8
That sounds like the right thing to do. Would you store the error in the
report *with the stack*? E.g.:

``` js
new Report({ errors: [ {
    line: error.line,
    column: error.column,
    message: error.message,
    stack: error.stack
} ] });
```

On Wed Oct 29 2014 at 1:16:49 AM Sébastien Cevey <notifications@github.com>
wrote:

> In bin/plumber:
>
> >  var hadErrors = false;
> >
> >  processedExecutions.
> >      map(function(execution) {
> > -        return execution.catch(function(error) {
> > -            printError("Plumber failed:", error.stack);
> > -            hadErrors = true;
> > -            return Rx.Observable.empty();
> > -        });
> > +        return execution
> > +            .catch(function(error) {
> > +                printError("Plumber failed:", error.stack);
> > +                hadErrors = true;
> > +                return Rx.Observable.empty();
> > +            })
> > +            .filter(function (resourceOrReport) {
>
> Maybe the catch above could even be mapped to an error report instead?
> Again, I'm more interested in correctness (currently it's wrong) than
> purity...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/plumberjs/plumber-cli/pull/9/files#r19513533>.
>