@acutmore/rxjs
Version:
Reactive Extensions for modern JavaScript
18 lines (17 loc) • 385 B
text/typescript
/**
* An error thrown when an Observable or a sequence was queried but has no
* elements.
*
* @see {@link first}
* @see {@link last}
* @see {@link single}
*
* @class EmptyError
*/
export class EmptyError extends Error {
constructor() {
super('no elements in sequence');
this.name = 'EmptyError';
(Object as any).setPrototypeOf(this, EmptyError.prototype);
}
}