input missing/unreadable/not a PDF
malformed page selection (validated before any work)
rendering an opened, in-range page to PNG failed
the OCR engine crashed twice on one page (message names it)
malformed word-dump input (--words-json / extractOcr words)
malformed Analysis handed to toMarkdown/toText (e.g. an out-of-range wordIndexes entry) — validated fail-fast, whole object checked before any output.
The closed set of error codes every
PdfToMdErrorcarries — switch oncodeinstead of parsingmessage.