Skip to main content

visual_cortex_ocr_onnx/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum OcrError {
3    #[error("model download failed for {url}: {reason}")]
4    Download { url: String, reason: String },
5
6    #[error("checksum mismatch for {path}: expected {expected}, got {actual}")]
7    ChecksumMismatch {
8        path: String,
9        expected: String,
10        actual: String,
11    },
12
13    #[error("model load failed: {0}")]
14    ModelLoad(String),
15
16    #[error("inference failed: {0}")]
17    Inference(String),
18}