1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::error::Error;
use std::fmt::{Display, Formatter};

#[derive(Debug)]
#[non_exhaustive]
/// Error occurred duration the execution of the action
pub enum ActionsError {
    /// This error happened while generating the context object
    Context(String),
}

impl Error for ActionsError {}

impl Display for ActionsError {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        use ActionsError::*;

        match self {
            Context(msg) => write!(f, "Problem while generating the context: {}", msg),
        }
    }
}