@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
| Variable | Description |
|---|---|
| E_INVALID_TESSERACT_JS_OCR_OPTIONS | Thrown 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_ERROR | Thrown 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]. |