diff options
author | tcmal <me@aria.rip> | 2024-06-04 21:34:55 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-06-04 21:34:55 +0100 |
commit | 543c0e4c1f4f20b1d987c91d610e869e1f68ecf4 (patch) | |
tree | a481cba35a357abbac5c9ac119d595590e370aad /src/error.rs | |
parent | c50e0ef424975e73d770ad5a4cc873abf2cb6a28 (diff) |
scaffolding event handlers
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..e12ae2c --- /dev/null +++ b/src/error.rs @@ -0,0 +1,21 @@ +use thiserror::Error; + +pub type Result<T, E = Error> = std::result::Result<T, E>; + +#[derive(Debug, Error)] +pub enum Error { + #[error("xcb returned screen that doesn't exist")] + NoSuchScreen, + + #[error("other wm is running")] + OtherWMRunning, + + #[error("connection error: {0}")] + ConnectionError(#[from] xcb::ConnError), + + #[error("protocol error: {0}")] + ProtocolError(#[from] xcb::ProtocolError), + + #[error("generic xcb error: {0}")] + XCBError(#[from] xcb::Error), +} |