Skip to main content

Module error

Module error 

Source
Expand description

This module defines the diagnostic conditions that are reported while a document is lowered for a backend (see backends, lowering, and outputs). The identifiers of most of these conditions begin with flm.lowering.. Two conditions have other identifiers: ContentNotCharacters (flm.verbatim.content-not-characters) and MathUnprocessed (flm.math.unprocessed).

Each of these conditions is reported as an Error diagnostic, and the lowering then continues with the rest of the document. The lowering driver (driver) handles a problem in one of two ways:

  • At one node. The node is replaced by a flm.pres.unsupported node without children, the error is reported at the node, and the rest of the tree is lowered as usual. UnsupportedElement, NoRule, RuleFailed and RegionNotFound are handled this way.
  • For the whole tree. The lowering of the tree stops, and the error is reported at the root of the tree. The tree has no entry in the table of lowered trees of the backend (LoweredTrees), so the backend writes no output for this tree. RoundsExceeded, NestingTooDeep and LoweringFailed are handled this way.

The other three conditions, FieldNotRead, ContentNotCharacters and MathUnprocessed, are reported by lowering rules. The documentation of each of them states what is written in place of the content.

Structs§

ContentNotCharacters
The error that is reported when the content of a verbatim region is not plain characters (flm.verbatim.content-not-characters).
FieldNotRead
The error that is reported when a field reaches the lowering (flm.lowering.field-not-read).
LoweringFailed
The error that is reported when the lowering of a tree fails as a whole (flm.lowering.failed).
MathUnprocessed
The error that is reported when a math group or a display-math environment is lowered on a backend for which no feature processes mathematics (id flm.math.unprocessed).
NestingTooDeep
The error that is reported when a tree is nested too deeply to be lowered (flm.lowering.nesting-too-deep).
NoRule
The error that is reported when the lowering reaches a node of an element that the backend cannot render and that is not listed as unrenderable in the plan request (id flm.lowering.no-rule).
RegionNotFound
The error that is reported when a lowering rule calls Lowerer::lower_region for a node region that does not exist (id flm.lowering.region-not-found).
RoundsExceeded
The error that is reported when the lowering of a tree reaches the maximum number of rounds and the tree still contains elements that the backend does not write natively (id flm.lowering.rounds-exceeded).
RuleFailed
The error that is reported when a lowering rule fails at a node (flm.lowering.rule-failed).
UnsupportedElement
The error that is reported when a document contains an element that the backend cannot render (flm.lowering.unsupported-element).