use std::fmt;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum PtarsError {
Descriptor(String),
Decode(String),
Encode(String),
Arrow(String),
}
impl fmt::Display for PtarsError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
PtarsError::Descriptor(msg) => write!(f, "descriptor error: {}", msg),
PtarsError::Decode(msg) => write!(f, "decode error: {}", msg),
PtarsError::Encode(msg) => write!(f, "encode error: {}", msg),
PtarsError::Arrow(msg) => write!(f, "arrow error: {}", msg),
}
}
}
impl std::error::Error for PtarsError {}