src/js/dthen.js
function() {
            // clean results of execution of a previous task

            this.$busy = 0;
            var pc = this.$taskCounter;
            if (this.$error !== null) {
                this.$taskCounter = 0;  // we have to count the tasks on this level
                this.$level       = level + 1;

                try {
                    if (typeof body === 'function') {
                        body.call(this, this.$error);
                    } else if (body === null) {

                    } else {
                        this.dumpError(this.$error);
                    }
                } catch(e) {
                    this.$level       = level; // restore level
                    this.$taskCounter = pc;    // restore counter
                    throw e;
                }
            }

            if (level === 0) {
                try {
                    this.$schedule();
                } catch(e) {
                    this.error(e);
                }
            } else {
                this.$schedule();
            }

            this.$level       = level; // restore level
            this.$taskCounter = pc;    // restore counter
        }
function() {
            // clean results of execution of a previous task

            this.$busy = 0;
            var pc = this.$taskCounter;
            if (this.$error !== null) {
                this.$taskCounter = 0;  // we have to count the tasks on this level
                this.$level       = level + 1;

                try {
                    if (typeof body === 'function') {
                        body.call(this, this.$error);
                    } else if (body === null) {

                    } else {
                        this.dumpError(this.$error);
                    }
                } catch(e) {
                    this.$level       = level; // restore level
                    this.$taskCounter = pc;    // restore counter
                    throw e;
                }
            }

            if (level === 0) {
                try {
                    this.$schedule();
                } catch(e) {
                    this.error(e);
                }
            } else {
                this.$schedule();
            }

            this.$level       = level; // restore level
            this.$taskCounter = pc;    // restore counter
        }
function ( ) { // clean results of execution of a previous task this . $busy = 0 ; var pc = this . $taskCounter ; if ( this . $error !== null ) { this . $taskCounter = 0 ; // we have to count the tasks on this level this . $level = level + 1 ; try { if ( typeof body === 'function' ) { body . call ( this , this . $error ) ; } else if ( body === null ) { } else { this . dumpError ( this . $error ) ; } } catch ( e ) { this . $level = level ; // restore level this . $taskCounter = pc ; // restore counter throw e ; } } if ( level === 0 ) { try { this . $schedule ( ) ; } catch ( e ) { this . error ( e ) ; } } else { this . $schedule ( ) ; } this . $level = level ; // restore level this . $taskCounter = pc ; // restore counter }
store level then was executed for the given task to be used to compute correct the level inside the method below
store level then was executed for the given task to be used to compute correct the level inside the method below