mirror of
https://framagit.org/veretcle/oolatoocs.git
synced 2025-07-20 20:41:17 +02:00
26 lines
454 B
Rust
26 lines
454 B
Rust
use std::{
|
|
error::Error,
|
|
fmt::{Display, Formatter, Result},
|
|
};
|
|
|
|
#[derive(Debug)]
|
|
pub struct OolatoocsError {
|
|
details: String,
|
|
}
|
|
|
|
impl OolatoocsError {
|
|
pub fn new(msg: &str) -> OolatoocsError {
|
|
OolatoocsError {
|
|
details: msg.to_string(),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Error for OolatoocsError {}
|
|
|
|
impl Display for OolatoocsError {
|
|
fn fmt(&self, f: &mut Formatter) -> Result {
|
|
write!(f, "{}", self.details)
|
|
}
|
|
}
|