use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
ParseFloat(#[from] std::num::ParseFloatError),
#[error("The pof time unit code is invalid: {0}")]
PofTimeUnit(u8),
#[error("The pof time info code is invalid: {0}")]
PofTimeInfo(u8),
#[error("Cannot interpolate in a source with only one point")]
OnePoint,
#[error("Time value is below minimum of the source: {0}")]
TimeBelowMinimum(f64),
#[error("Time value is above the maximum of the source: {0}")]
TimeAboveMaximum(f64),
}