lib/immutable-core-task-instance.js
/**
 * @function nextStepMethodError
 *
 * after method error either retry, run error method if defined, run reverse
 * if any reverse methods, or complete with error
 *
 * @returns {Promise<undefined>}
 */
@function nextStepMethodError
after method error either retry, run error method if defined, run reverse
if any reverse methods, or complete with error

@returns {Promise}
@function nextStepMethodError after method error either retry run error method if defined run reverse if any reverse methods or complete with error @returns { Promise }
async function nextStepMethodError () {
    var step = this.status.step
    if (this.status.retry) {
        this.status.retry = undefined
        this.status.error = undefined
        if (defined(step.check)) {
            this.status.subStep = 'check'
            this.status.try.check = 0
        }
        else {
            this.status.try.method++
        }
    }
    else if (this.retry(step.retry)) {
        await this.save()
        this.status = undefined
    }
    else if (defined(step.error)) {
        this.status.try.error = 0
        this.status.subStep = 'error'
    }
    else {
        if (step.ignoreError) {
            await this.nextStepMethod()
        }
        else {
            await this.completeFailure()
        }
    }
}
async function nextStepMethodError ( ) { var step = this . status . step if ( this . status . retry ) { this . status . retry = undefined this . status . error = undefined if ( defined ( step . check ) ) { this . status . subStep = 'check' this . status . try . check = 0 } else { this . status . try . method ++ } } else if ( this . retry ( step . retry ) ) { await this . save ( ) this . status = undefined } else if ( defined ( step . error ) ) { this . status . try . error = 0 this . status . subStep = 'error' } else { if ( step . ignoreError ) { await this . nextStepMethod ( ) } else { await this . completeFailure ( ) } } }
@function nextStepMethodError
 after method error either retry, run error method if defined, run reverse
 if any reverse methods, or complete with error
@function nextStepMethodError after method error either retry run error method if defined run reverse if any reverse methods or complete with error
// get current step // if retry was previously scheduled then run now // clear retry flag // clear error // if step has check sub-step then run that before method // run the check sub-step // start the check try count at 0 // otherwise retry method // increment try count // retry if possible // save instance to re-run after timeout // clear status to stop current run // step has error handler // first try of error handler follows method error // run error sub-step // error is not handled // if errors are being ignored then continue to next step // complete task with failure