capture errors during pipeline execution

With this change, errors from mongo look like this:

```
An error occurred during evaluation: com.mongodb.CommandFailureException: 
{
 "serverUsed" : "ds045089.mongolab.com:45089" ,
 "errmsg" : "exception: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in." ,
 "code" : 16819 ,
 "ok" : 0.0
}
```
instead of just saying `result undefined`.