parrotd/src/err.rs
2022-11-20 20:33:04 -05:00

15 lines
275 B
Rust

#[derive(Debug)]
pub enum ParrotError {
IconPackNotFoundError,
InvalidIconPackError,
IOError(std::io::Error),
}
pub type Result<T> = std::result::Result<T, ParrotError>;
macro_rules! try_io {
($x:expr) => {
$x.map_err(ParrotError::IOError)?
}
}