use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Error)]
pub enum ParseError {
#[error("invalid format | raw: {raw}")]
InvalidFormat {
raw: String,
},
#[error("file not found or inaccessible: {path}")]
FileNotFound {
path: String,
},
#[error("invalid record start line: line does not match expected format | raw: {raw}")]
InvalidRecordStartLine {
raw: String,
},
#[error("failed to parse {field} as integer: {value} | raw: {raw}")]
IntParseError {
field: String,
value: String,
raw: String,
},
#[error("IO error: {0}")]
IoError(String),
}