Skip to content

Documentation / @facturometro/einvoice / RulesetError

Class: RulesetError ​

Defined in: packages/core/src/errors.ts:235

A ruleset definition or composition is broken: duplicate or unknown rule ids, a disable or override that names nothing earlier in the list, a required ruleset that is missing or listed later, a ruleset listed twice, an empty composition, or a rule id defined again after an earlier ruleset disabled it.

Example ​

ts
import { RulesetError } from '@facturometro/core';

throw new RulesetError('Unknown rule id BR-99 in disable.', 'acme-cius');

Extends ​

Constructors ​

Constructor ​

new RulesetError(message, rulesetId, options?): RulesetError

Defined in: packages/core/src/errors.ts:248

Creates a ruleset error.

Parameters ​

message ​

string

What is wrong with the ruleset.

rulesetId ​

string

Id of the offending ruleset.

options? ​

ErrorOptions

Standard error options, in particular cause.

Returns ​

RulesetError

Overrides ​

EInvoiceError.constructor

Properties ​

cause? ​

optional cause?: unknown

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from ​

EInvoiceError.cause


code ​

readonly code: "EINV-RULESET"

Defined in: packages/core/src/errors.ts:236

Stable, machine-readable identifier of the failure.

Overrides ​

EInvoiceError.code


message ​

message: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from ​

EInvoiceError.message


name ​

name: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from ​

EInvoiceError.name


rulesetId ​

readonly rulesetId: string

Defined in: packages/core/src/errors.ts:239

Id of the ruleset that is broken; '' when the composition is empty.


stack? ​

optional stack?: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from ​

EInvoiceError.stack

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.