zbus_lockstep/
error.rs

1#[non_exhaustive]
2#[derive(Debug)]
3pub enum LockstepError {
4    ArgumentNotFound(String),
5    InterfaceNotFound(String),
6    MemberNotFound(String),
7    PropertyNotFound(String),
8}
9
10impl std::error::Error for LockstepError {}
11
12impl std::fmt::Display for LockstepError {
13    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14        match self {
15            LockstepError::ArgumentNotFound(name) => {
16                write!(f, "Argument \"{name}\" not found.")
17            }
18            LockstepError::InterfaceNotFound(name) => {
19                write!(f, "Interface \"{name}\" not found.")
20            }
21            LockstepError::MemberNotFound(name) => {
22                write!(f, "Member \"{name}\" not found.")
23            }
24            LockstepError::PropertyNotFound(name) => {
25                write!(f, "Property \"{name}\" not found.")
26            }
27        }
28    }
29}