diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/error.rs b/src/error.rs index e12ae2c..3086204 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,7 +1,9 @@ use thiserror::Error; +/// The Result type used throughout pub type Result<T, E = Error> = std::result::Result<T, E>; +/// All errors that can be encountered when running #[derive(Debug, Error)] pub enum Error { #[error("xcb returned screen that doesn't exist")] @@ -10,12 +12,12 @@ pub enum Error { #[error("other wm is running")] OtherWMRunning, + #[error("generic xcb error: {0}")] + Xcb(#[from] xcb::Error), + #[error("connection error: {0}")] - ConnectionError(#[from] xcb::ConnError), + Connection(#[from] xcb::ConnError), #[error("protocol error: {0}")] - ProtocolError(#[from] xcb::ProtocolError), - - #[error("generic xcb error: {0}")] - XCBError(#[from] xcb::Error), + Protocol(#[from] xcb::ProtocolError), } |