1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use thiserror::Error;
#[derive(Debug, Error)]
pub enum CarError {
#[error("parsing the file error: {0}")]
Parsing(String),
#[error("invalid file error: {0}")]
InvalidFile(String),
#[error("invalid section error: {0}")]
InvalidSection(String),
#[error("Io error: {0}")]
IO(#[from] std::io::Error),
#[error("too large section error: {0}")]
TooLargeSection(usize),
#[error("Not found {0}")]
NotFound(String),
}