{"version":3,"file":"exceptions.mjs","names":[],"sources":["../../../../../src/batteries/specialists/ocr/tesseract_js/exceptions.ts"],"sourcesContent":["/**\n * Battery-scoped exception constructors for the tesseract.js OCR specialist adapter.\n *\n * @module @nhtio/adk/batteries/specialists/ocr/tesseract_js/exceptions\n *\n * @remarks\n * Battery-scoped exception classes for the tesseract.js OCR adapter, minted via `createException`\n * from `@nhtio/adk/factories`. Categories mirror the embeddings batteries one-to-one — only the\n * engine-specific failure differs.\n */\n\nimport { createException } from '@nhtio/adk/factories'\n\n/**\n * Thrown when the resolved adapter options fail validation against\n * `tesseractJsOcrOptionsSchema` — e.g. a missing/empty `languages` or an unknown option key.\n * Fatal: config bugs fail loud, not at recognize time.\n */\nexport const E_INVALID_TESSERACT_JS_OCR_OPTIONS = createException<[string]>(\n  'E_INVALID_TESSERACT_JS_OCR_OPTIONS',\n  'Invalid tesseract.js OCR adapter options: %s',\n  'E_INVALID_TESSERACT_JS_OCR_OPTIONS',\n  529,\n  true\n)\n\n/**\n * Thrown when the tesseract.js worker fails to load (e.g. the `tesseract.js` peer is not\n * installed), when `recognize()` throws, or when a per-call language override cannot be honored\n * against a cached worker. Non-fatal. Printf arg: `[detail]`.\n */\nexport const E_TESSERACT_JS_OCR_ENGINE_ERROR = createException<[string]>(\n  'E_TESSERACT_JS_OCR_ENGINE_ERROR',\n  'tesseract.js OCR engine error: %s',\n  'E_TESSERACT_JS_OCR_ENGINE_ERROR',\n  502,\n  false\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAa,qCAAqC,gBAChD,sCACA,gDACA,sCACA,KACA,IACF;;;;;;AAOA,IAAa,kCAAkC,gBAC7C,mCACA,qCACA,mCACA,KACA,KACF"}