Home Manual Reference Source Test Repository

es6/util/EmptyError.js

/**
 * 当查询 Observable 或者序列没有元素时,则抛出该错误。
 *
 * @see {@link first}
 * @see {@link last}
 * @see {@link single}
 *
 * @class EmptyError
 */
export class EmptyError extends Error {
    constructor() {
        const err = super('no elements in sequence');
        this.name = err.name = 'EmptyError';
        this.stack = err.stack;
        this.message = err.message;
    }
}
//# sourceMappingURL=EmptyError.js.map