use thiserror::Error;
#[derive(Error, Debug)]
pub enum AchError {
#[error("Invalid record type: {0}")]
InvalidRecordType(String),
#[error("Invalid line length: expected 94, got {0}")]
InvalidLineLength(usize),
#[error("Invalid numeric field '{field}': {source}")]
InvalidNumber {
field: &'static str,
source: std::num::ParseIntError,
},
#[error("Invalid file structure: {0}")]
InvalidStructure(String),
#[error("Empty file")]
EmptyFile,
#[error("Incomplete batch: {0}")]
IncompleteBatch(String),
}