broccolijs/broccoli — pull request #194 by diogoko (2014-10-04 16:01:46+00:00)
Title: Support for .brocfileLocation in error objects

Adds support for a `.brocfileLocation` property on error objects thrown by plugins as suggested by @rwjblue in issue #192.

Setting the property in `broccoli-writer` was not possible as not every plugin calls its parent's constructor (eg: `broccoli-es6-concatenator`), but decorating the error is feasible with a simple:

```javascript
}).catch(function(err) {
if (self.brocfileLocation) {
err.brocfileLocation = self.brocfileLocation
}
throw err
})
```