From 543c0e4c1f4f20b1d987c91d610e869e1f68ecf4 Mon Sep 17 00:00:00 2001 From: tcmal Date: Tue, 4 Jun 2024 21:34:55 +0100 Subject: scaffolding event handlers --- src/error.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/error.rs (limited to 'src/error.rs') 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 = std::result::Result; + +#[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), +} -- cgit v1.2.3