Skip to main content

Module catalog

Module catalog 

Source
Expand description

Pluggable error-code catalog.

quarto-error-reporting is catalog-agnostic: it defines the catalog shape (ErrorCodeInfo) and a CatalogProvider seam, but ships no catalog data. An embedding product installs its own catalog once, early, via install_catalog; in Quarto this is done by the quarto-error-catalog crate (quarto_error_catalog::install()), which carries the Q-* error_catalog.json. With nothing installed, every lookup returns None (see EmptyCatalog).

This is the host side of the cross-package error-code discipline; see claude-notes/designs/cross-package-error-codes.md.

Structs§

EmptyCatalog
The default provider used when none has been installed: every lookup is None. This is what makes the crate usable standalone with zero config — a non-Quarto consumer that installs nothing simply gets code-less, URL-less diagnostics (tier-2 “passthrough” in the discipline’s terms).
ErrorCodeInfo
Metadata for an error code.

Traits§

CatalogProvider
A source of error-code metadata, supplied by the embedding product.

Functions§

get_docs_url
Get the documentation URL for an error code, if the installed catalog has one.
get_error_info
Look up full metadata for an error code via the installed catalog.
get_subsystem
Get the subsystem name for an error code, if the installed catalog knows it.
install_catalog
Install the process-wide catalog provider.