mirror of
https://framagit.org/veretcle/oolatoocs.git
synced 2025-07-21 04:51:17 +02:00
feat: add video/gif medias
This commit is contained in:
25
src/error.rs
Normal file
25
src/error.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user