1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Error types for the OCR pipeline.
//!
//! Provides [`OCRError`] (the pipeline-wide error type), [`ProcessingStage`]
//! (which stage an error occurred in), and helper constructors for building
//! errors with context and chaining.
//!
//! # Usage
//!
//! ```rust
//! use oar_ocr_core::core::errors::{OCRError, ProcessingStage};
//!
//! // Create a processing error with context
//! let error = OCRError::tensor_operation(
//! "Failed to reshape tensor for batch processing",
//! std::io::Error::new(std::io::ErrorKind::InvalidData, "Invalid tensor shape")
//! );
//!
//! // Create a configuration error
//! let config_error = OCRError::config_error("Missing required model path");
//!
//! // Create a validation error with detailed context
//! let validation_error = OCRError::validation_error(
//! "TextDetector",
//! "input_size",
//! "[640, 640]",
//! "[320, 320]"
//! );
//! ```
pub use ;
/// Convenient result alias for OCR operations.
pub type OcrResult<T> = ;
// Note: Constructor methods are implemented directly on OCRError in the constructors module,
// so they are automatically available when OCRError is imported.