UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

24 lines 563 B
import { BaseError } from '../errors'; export class FormulaErrorList { constructor() { this.errorList = []; } push(error) { if (error instanceof BaseError) { this.errorList.push(error); } else if (error instanceof Error) { throw error; } else { throw new Error('Invalid Error object'); } } get() { return this.errorList; } get hasErrors() { return this.errorList.length > 0; } } //# sourceMappingURL=formulaErrorList.js.map