use thiserror::Error;
pub type Result<T> = std::result::Result<T, CoreError>;
#[derive(Error, Debug)]
pub enum CoreError {
#[error("Tensor operation failed: {0}")]
TensorError(String),
#[error("Shape mismatch: {0}")]
ShapeMismatch(String),
#[error("Invalid operation: {0}")]
InvalidOperation(String),
#[error("Graph error: {0}")]
GraphError(String),
#[error("Session error: {0}")]
SessionError(String),
#[error("Candle error: {0}")]
CandleError(#[from] candle_core::Error),
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
}