Skip to main content

Module error

Module error 

Source
Expand description

Structured error type.

Errors are split into two paths, per the “graceful degradation” principle:

  • Fatal — the document cannot be parsed at all (bad container, wrong password, structurally broken). These return Err(PdfmuseError).
  • Degradable — a single page/object is damaged, a font lacks a CMap, a page needs OCR, etc. These do not error; they are recorded in crate::ir::Document::warnings and parsing continues.

The core never panic!s on malformed input — every failure surfaces as one of these two. Bindings map PdfmuseError onto each language’s exception type.

Enums§

PdfmuseError
A fatal parsing error. Non-fatal degradations use crate::ir::Warning instead.

Type Aliases§

Result
Convenience alias used throughout the crate and by the public API.