{"version":3,"file":"exceptions.cjs","names":[],"sources":["../../../src/vision/core/exceptions.ts"],"sourcesContent":["/** @generated Vendored from @mauriciobenjamin700/ort-vision-sdk-web. Do not hand-edit — regenerate with `npm run vendor:vision`. */\n/**\n * Exceptions raised by the SDK.\n *\n * All exceptions inherit from {@link OrtVisionError}, so callers can catch\n * the base class to handle any SDK-originated failure uniformly.\n */\n\nexport class OrtVisionError extends Error {\n    constructor(message: string, options?: ErrorOptions) {\n        super(message, options);\n        this.name = new.target.name;\n    }\n}\n\n/** Raised when an ONNX model cannot be loaded into an inference session. */\nexport class ModelLoadError extends OrtVisionError {}\n\n/** Raised when ONNX Runtime fails while executing a model. */\nexport class InferenceError extends OrtVisionError {}\n\n/** Raised when a requested execution provider is not available. */\nexport class ProviderNotAvailableError extends OrtVisionError {}\n\n/** Raised when an input image cannot be decoded into the canonical format. */\nexport class ImageLoadError extends OrtVisionError {}\n\n/** Raised when class labels cannot be resolved from the supplied spec. */\nexport class LabelMapError extends OrtVisionError {}\n\n/**\n * Raised when a detection task finds nothing and was asked to treat that as an error.\n *\n * Only raised when the caller opts in with `raiseOnEmpty: true`. The default\n * stays an empty result, because \"the model looked and found nothing\" is a\n * successful inference, not a failure — a photo of an empty field is a valid\n * photo. What the flag is for is the opposite situation: a pipeline step whose\n * *precondition* is that something is there, where an empty result means the\n * caller should stop rather than quietly carry on with zero rows.\n *\n * \"Nothing was detected\" and \"nothing was confident enough\" are the same\n * condition here, since the confidence threshold is what decides what counts as\n * a detection in the first place.\n */\nexport class NoDetectionsError extends OrtVisionError {}\n\n/**\n * Raised when a model cannot be driven as a fused detect→classify pipeline.\n *\n * In the browser this means the file carries no `ovs.*` metadata — it is a\n * plain detector or classifier rather than something `ort_vision_sdk.compose`\n * produced — or the graph is missing an output the pipeline contract requires.\n * Building a pipeline is a Python-side build step; the browser only runs one.\n */\nexport class FusionError extends OrtVisionError {}\n"],"mappings":"AAQA,IAAa,EAAb,cAAoC,KAAM,CACtC,YAAY,EAAiB,EAAwB,CACjD,MAAM,EAAS,CAAO,EACtB,KAAK,KAAO,WAAW,IAC3B,CACJ,EAGa,EAAb,cAAoC,CAAe,CAAC,EAGvC,EAAb,cAAoC,CAAe,CAAC,EAGvC,EAAb,cAA+C,CAAe,CAAC,EAGlD,EAAb,cAAoC,CAAe,CAAC,EAGvC,EAAb,cAAmC,CAAe,CAAC,EAgBtC,EAAb,cAAuC,CAAe,CAAC,EAU1C,EAAb,cAAiC,CAAe,CAAC"}