#[derive(Debug)]
pub enum SmoothError {
    SMAApplyError,
    EMAApplyError,
    RMAApplyError,
    MedianApplyError
}
use std::fmt;

impl fmt::Display for SmoothError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            SmoothError::SMAApplyError => write!(f, "Failed to apply the sma to the data"),
            SmoothError::EMAApplyError => write!(f, "Failed to apply the ema to the data"),
            SmoothError::RMAApplyError => write!(f, "Failed to apply the rma to the data"),
            SmoothError::MedianApplyError => write!(f, "Failed to apply the median to the data")
        }
    }
}

impl std::error::Error for SmoothError {}