UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

13 lines (12 loc) 460 B
import { setBaseErrorOptions } from "./BaseError.js"; /** * Aggregate an array of errors into a single combined error. * - Extends (and shadows) the built-in `AggregateError` but with additional allowed options like `caller` */ export class Errors extends AggregateError { constructor(errors, message, options = {}) { super(errors, message, options); setBaseErrorOptions(Errors, this, options); } } Errors.prototype.name = "Errors";