Skip to main content

RuleViolationError

Thrown by generate when the graph breaks a rule somewhere no exception covers.

@group

Errors/Rule

@throws

When a selected node does not satisfy a rule's assert, and no exception of the rule names it.

Hierarchy

Index

Constructors

Properties

Constructors

constructor

  • RuleViolationError(message: string, violations: { moduleId: string; node: string; reason: string; rule: string }[]): RuleViolationError
  • Parameters

    • message: string

      The error message.

    • violations: { moduleId: string; node: string; reason: string; rule: string }[]

      Every uncovered violation, of every rule.

    Returns RuleViolationError

Properties

readonlyinheritedrule

rule: string

The rule's name, or its position in the rules file when it has no name.

readonlyviolations

violations: { moduleId: string; node: string; reason: string; rule: string }[]

Each node a rule does not hold for: the rule's name and reason, the node's context or module id, and the module that built it.

Page Options