Skip to content
1 min read · 122 words

@nhtio/adk/batteries/specialists/ocr/tesseract_js/exceptions

Battery-scoped exception constructors for the tesseract.js OCR specialist adapter.

Remarks

Battery-scoped exception classes for the tesseract.js OCR adapter, minted via createException from @nhtio/adk/factories. Categories mirror the embeddings batteries one-to-one — only the engine-specific failure differs.

Variables

VariableDescription
E_INVALID_TESSERACT_JS_OCR_OPTIONSThrown when the resolved adapter options fail validation against tesseractJsOcrOptionsSchema — e.g. a missing/empty languages or an unknown option key. Fatal: config bugs fail loud, not at recognize time.
E_TESSERACT_JS_OCR_ENGINE_ERRORThrown when the tesseract.js worker fails to load (e.g. the tesseract.js peer is not installed), when recognize() throws, or when a per-call language override cannot be honored against a cached worker. Non-fatal. Printf arg: [detail].