minor
This commit is contained in:
parent
02e737e074
commit
396b66e436
1 changed files with 2 additions and 2 deletions
|
@ -28,11 +28,11 @@ class Task {
|
|||
try {
|
||||
const ret = this.method.apply(this, this.args)
|
||||
if (ret && typeof ret.then === 'function') {
|
||||
ret.catch(e => log.error('TASK ERROR [%s]: %s', this.name, e))
|
||||
ret.catch(e => log.error(`TASK ERROR [${this.name}]: ${e} ${e.stack}`))
|
||||
return ret
|
||||
}
|
||||
} catch (e) {
|
||||
log.error('TASK ERROR [%s]: %s ', this.name, e)
|
||||
log.error(`TASK ERROR [${this.name}]: ${e} ${e.stack}`)
|
||||
return Promise.resolve(false)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue