1
Fork 0

make error event more consistent between transforms and generators

This commit is contained in:
Conduitry 2017-04-23 21:10:00 -04:00
parent 76987f83b5
commit 185171caec

View file

@ -261,12 +261,13 @@ export default class Defiler extends EventEmitter {
}
async _handleGeneratedFile(path) {
let file
try {
let file = new File(path)
file = new File(path)
await this._customGenerators.get(path).call(this, file)
await this.addFile(file)
} catch (err) {
this.emit('error', path, err)
this.emit('error', file, err)
}
}