make error
event more consistent between transforms and generators
This commit is contained in:
parent
76987f83b5
commit
185171caec
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue