augurs_forecaster/
error.rs

1use augurs_core::ModelError;
2
3use crate::transforms;
4
5/// Errors returned by this crate.
6#[derive(Debug, thiserror::Error)]
7pub enum Error {
8    /// The model has not yet been fit.
9    #[error("Model not yet fit")]
10    ModelNotYetFit,
11    /// An error occurred while fitting a model.
12    #[error("Fit error: {source}")]
13    Fit {
14        /// The original error.
15        source: Box<dyn ModelError>,
16    },
17    /// An error occurred while making predictions for a model.
18    #[error("Predict error: {source}")]
19    Predict {
20        /// The original error.
21        source: Box<dyn ModelError>,
22    },
23
24    /// An error occurred while running a transformation.
25    #[error("Transform error: {source}")]
26    Transform {
27        /// The original error.
28        #[from]
29        source: transforms::Error,
30    },
31}