rustix_bl/errors.rs
1
2
3pub mod custom_errors {
4 use std;
5 use std::error::Error;
6 use std::fmt;
7
8 #[derive(Debug)]
9 pub struct CustomRustixFrontendError {
10 pub err: String,
11 }
12
13 impl Error for CustomRustixFrontendError {
14 fn description(&self) -> &str {
15 "Something bad happened"
16 }
17 }
18
19 impl fmt::Display for CustomRustixFrontendError {
20 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
21 write!(f, "Oh no, something bad went down")
22 }
23 }
24}