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 ​
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 ​
Properties ​
cause? ​
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from ​
code ​
readonlycode:"EINV-RULESET"
Defined in: packages/core/src/errors.ts:236
Stable, machine-readable identifier of the failure.
Overrides ​
message ​
message:
string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from ​
name ​
name:
string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from ​
rulesetId ​
readonlyrulesetId:string
Defined in: packages/core/src/errors.ts:239
Id of the ruleset that is broken; '' when the composition is empty.
stack? ​
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076