use thiserror::Error;
#[derive(Error, Debug)]
pub enum MatrixError {
#[error("Invalid matrix format: {0}")]
InvalidFormat(String),
#[allow(dead_code)]
#[error("Row index out of bounds: row {row}, matrix has {count} rows")]
RowOutOfBounds { row: usize, count: usize },
#[allow(dead_code)]
#[error("Column count mismatch: expected {expected}, got {got}")]
ColumnMismatch { expected: usize, got: usize },
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Parse error at line {line}: {message}")]
ParseError { line: usize, message: String },
}