1use std::error::Error;
2use std::fmt::{Display, Formatter};
3
4#[derive(Debug)]
5#[non_exhaustive]
6pub enum ActionsError {
8 Context(String),
10 InputNotFound(String),
12 Output(String),
14}
15
16impl Error for ActionsError {}
17
18impl Display for ActionsError {
19 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
20 use ActionsError::*;
21
22 match self {
23 Context(msg) => write!(f, "Problem while generating the context: {}", msg),
24 InputNotFound(input) => write!(f, "Input required and not supplied: {}", input),
25 Output(msg) => write!(f, "{}", msg),
26 }
27 }
28}