sfn_machine/machine/
error.rs

1use std::fmt;
2use std::error::Error;
3
4/// Custom error that can be thrown at any point in the execution
5#[derive(Debug)]
6pub struct StateMachineError {
7    /// error string
8    pub message: String,
9}
10
11impl fmt::Display for StateMachineError {
12  fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
13    write!(f, "{}", self.message)
14  }
15}
16
17impl Error for StateMachineError {}