feat(backups/Task): add original log to *log after end* error

This commit is contained in:
Julien Fontanet 2022-08-29 10:05:25 +02:00
parent 58ab32a623
commit 276d1ce60a

View File

@ -3,8 +3,10 @@
const CancelToken = require('promise-toolbox/CancelToken') const CancelToken = require('promise-toolbox/CancelToken')
const Zone = require('node-zone') const Zone = require('node-zone')
const logAfterEnd = () => { const logAfterEnd = log => {
throw new Error('task has already ended') const error = new Error('task has already ended')
error.log = log
throw error
} }
const noop = Function.prototype const noop = Function.prototype