17 lines
324 B
Rust
17 lines
324 B
Rust
use std::fmt::{Display, Formatter, Result as FmtResult};
|
|
|
|
use derive_more::Constructor;
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Constructor, Hash)]
|
|
pub struct Catchable {
|
|
msg: String,
|
|
}
|
|
|
|
impl Display for Catchable {
|
|
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
|
|
write!(f, "<error: {}>", self.msg)
|
|
}
|
|
}
|
|
|