lib/altshift/application.js
function (error) {
        if (!this.started) {
            return;
        }

        var errorHandlers = this.errorHandlers,
            length = errorHandlers.length,
            errorHandler,
            errorHandled = false,
            errorString,
            i;

        //Exit handling
        if (error instanceof SystemExit) {
            this._exit(error.code);
            return;
        }

        try {
            for (i = 0; i < length; i += 1) {
                errorHandler = errorHandlers[i];
                errorHandled = !!errorHandler(error);

                if (errorHandled) {
                    return;
                }
            }
        } catch (e) {
            this._printError(e);
            this._exit(1);
        }

        //Default error handling
        errorString = '' + (error.stack || error);
        this._printError(errorString);
        this._exit(1);
    }
function (error) {
        if (!this.started) {
            return;
        }

        var errorHandlers = this.errorHandlers,
            length = errorHandlers.length,
            errorHandler,
            errorHandled = false,
            errorString,
            i;

        //Exit handling
        if (error instanceof SystemExit) {
            this._exit(error.code);
            return;
        }

        try {
            for (i = 0; i < length; i += 1) {
                errorHandler = errorHandlers[i];
                errorHandled = !!errorHandler(error);

                if (errorHandled) {
                    return;
                }
            }
        } catch (e) {
            this._printError(e);
            this._exit(1);
        }

        //Default error handling
        errorString = '' + (error.stack || error);
        this._printError(errorString);
        this._exit(1);
    }
function ( error ) { if ( ! this . started ) { return ; } var errorHandlers = this . errorHandlers , length = errorHandlers . length , errorHandler , errorHandled = false , errorString , i ; //Exit handling if ( error instanceof SystemExit ) { this . _exit ( error . code ) ; return ; } try { for ( i = 0 ; i < length ; i += 1 ) { errorHandler = errorHandlers [ i ] ; errorHandled = ! ! errorHandler ( error ) ; if ( errorHandled ) { return ; } } } catch ( e ) { this . _printError ( e ) ; this . _exit ( 1 ) ; } //Default error handling errorString = '' + ( error . stack || error ) ; this . _printError ( errorString ) ; this . _exit ( 1 ) ; }
Handle one error

@param {*} error
Handle one error