applications/error.rs
1use thiserror::Error;
2
3/// Error enum
4#[derive(Error, Debug)]
5pub enum Error {
6 /// An error in inotify.
7 #[error("Notify error: {0}")]
8 NotifyError(#[from] notify::Error),
9
10 /// Attempted to launch application/action but exec string is empty.
11 #[error("Exec string is empty")]
12 ExecEmpty,
13
14 /// I/O error.
15 #[error("I/O Error: {0}")]
16 IOError(#[from] std::io::Error),
17}
18
19/// Alias for a [`std::result::Result`] with the error type [`crate::Error`].
20pub type Result<T> = std::result::Result<T, Error>;