Skip to main content

Module error

Module error 

Source
Expand description

§Error Handling

Error types and diagnostics for parsing and rendering, with source location tracking.

§Document path anchors

A Diagnostic carries two independent “where” anchors, both optional:

  • Diagnostic::location: source-text anchor (file:line:column). Produced by parsers and backend compilers operating on raw text.
  • Diagnostic::path: document-model anchor into the typed crate::document::Document. Produced by schema validation and coercion, which run on the typed model after line spans are gone.

DocPath is the one type that constructs, renders, and parses the path, no site assembles one with format!. Its module doc carries the grammar; prose/canon/ERROR.md tabulates the anchors.

Re-exports§

pub use crate::document::limits::MAX_YAML_DEPTH;

Structs§

Diagnostic
Structured diagnostic information.
Location
RenderError
Main error type for rendering operations: a non-empty collection of Diagnostics.
RenderResult
YamlError
A YAML parse or emit failure, owned by this crate.

Enums§

ParseError
Severity
Fatality is this two-value ladder and nothing else: Error blocks the stage that emits it, Warning never does. There is no lint-level configuration and no warning-to-error promotion; an informational aside is a Diagnostic::hint, not a severity.

Constants§

MAX_CARD_COUNT
Maximum number of card blocks allowed per document
MAX_FIELD_COUNT
Maximum number of fields allowed per document
MAX_INPUT_SIZE
Maximum input size for markdown (10 MiB)
MAX_NESTING_DEPTH
Maximum nesting depth for markdown structures (100 levels). Owned by the markdown codecs in quillmark-content (the import guard) and re-exported here so the typst backend’s markup converter shares one limit: a document that imports also renders, and vice versa. Maximum container nesting depth the markdown codecs accept before erroring. The import guard (import::from_markdown) and the typst backend’s markup converter share this one limit (the backend re-exports it via quillmark_core::error::MAX_NESTING_DEPTH), so a document that imports also renders.
MAX_YAML_SIZE
Maximum YAML size (1 MiB)

Functions§

print_errors