minor
This commit is contained in:
@@ -28,11 +28,11 @@ class Task {
|
|||||||
try {
|
try {
|
||||||
const ret = this.method.apply(this, this.args)
|
const ret = this.method.apply(this, this.args)
|
||||||
if (ret && typeof ret.then === 'function') {
|
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
|
return ret
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error('TASK ERROR [%s]: %s ', this.name, e)
|
log.error(`TASK ERROR [${this.name}]: ${e} ${e.stack}`)
|
||||||
return Promise.resolve(false)
|
return Promise.resolve(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user