function AuthError(message, state) {
        var _this = _super.call(this, message) || this;
        _this.state = state;
        _this.name = 'AuthError';
        _this.message = message;
        if (Error.captureStackTrace) {
            Error.captureStackTrace(_this, _this.constructor);
        }
        else {
            var error = new Error();
            if (error.stack) {
                var last_part = error.stack.match(/[^\s]+$/);
                _this.stack = _this.name + " at " + last_part;
            }
        }
        return _this;
    }
/**
     * @constructor
     *
     * @param message Error message to be propagated.
     * @param state OAuth state if available.
    */
@constructor

@param message Error message to be propagated.
@param state OAuth state if available.
@constructor @param message Error message to be propagated . @param state OAuth state if available .
function AuthError(message, state) {
        var _this = _super.call(this, message) || this;
        _this.state = state;
        _this.name = 'AuthError';
        _this.message = message;
        if (Error.captureStackTrace) {
            Error.captureStackTrace(_this, _this.constructor);
        }
        else {
            var error = new Error();
            if (error.stack) {
                var last_part = error.stack.match(/[^\s]+$/);
                _this.stack = _this.name + " at " + last_part;
            }
        }
        return _this;
    }
function AuthError ( message , state ) { var _this = _super . call ( this , message ) || this ; _this . state = state ; _this . name = 'AuthError' ; _this . message = message ; if ( Error . captureStackTrace ) { Error . captureStackTrace ( _this , _this . constructor ) ; } else { var error = new Error ( ) ; if ( error . stack ) { var last_part = error . stack . match ( / [^\s]+$ / ) ; _this . stack = _this . name + " at " + last_part ; } } return _this ; }
@constructor
@constructor