summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-06-04 21:34:55 +0100
committertcmal <me@aria.rip>2024-06-04 21:34:55 +0100
commit543c0e4c1f4f20b1d987c91d610e869e1f68ecf4 (patch)
treea481cba35a357abbac5c9ac119d595590e370aad /src/error.rs
parentc50e0ef424975e73d770ad5a4cc873abf2cb6a28 (diff)
scaffolding event handlers
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs21
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),
+}