rlox_nn/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum NNError {
5 #[error("Backend error: {0}")]
6 Backend(String),
7
8 #[error("Shape mismatch: expected {expected}, got {got}")]
9 ShapeMismatch { expected: String, got: String },
10
11 #[error("Device error: {0}")]
12 Device(String),
13
14 #[error("Serialization error: {0}")]
15 Serialization(String),
16
17 #[error("Not supported: {0}")]
18 NotSupported(String),
19}