linnovate/meanio — pull request #10 by elmalto (2014-09-25 20:45:05+00:00)
Title: Catch errors from uglify

Uglify's error messages cant be pretty nonexistent at times. Catching them and then returning the actual messages from the stack trace helps a lot

e.g.

```
/node_modules/meanio/node_modules/uglify-js/lib/parse.js:197
throw new JS_Parse_Error(message, line, col, pos);
^
Error
at new JS_Parse_Error (/node_modules/meanio/node_modules/uglify-js/lib/parse.js:189:18)
at js_error (/node_modules/meanio/node_modules/uglify-js/lib/parse.js:197:11)
```

becomes:

```
Error in file /packages/system/public/controllers/index.js on line 103
Unexpected token punc «)», expected punc «,»

/node_modules/meanio/lib/aggregation.js:117
throw e;
^
Error
at new JS_Parse_Error (/node_modules/meanio/node_modules/uglify-js/lib/parse.js:189:18
```