From d44041040d755306c39d6de8da5b42d7ded6808c Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 25 Sep 2024 15:13:34 +0200 Subject: added notifications and improved stuff --- src/error.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index cb57e99..8270b45 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,5 @@ +use tracing::error; + pub type Result = std::result::Result; #[derive(Debug, thiserror::Error)] @@ -17,6 +19,10 @@ pub enum Error { #[error("Requested backup not found")] BackupNotFound, + // Utils + #[error("System directory not found")] + NoSysDir, + // Packages #[error("Unknown Package Manger Output")] UnknownOutput, @@ -25,12 +31,23 @@ pub enum Error { Unsupported, // Deps + #[error(transparent)] + Config(#[from] config::ConfigError), + #[error(transparent)] SerdeJson(#[from] serde_json::Error), #[error(transparent)] TomlSerialize(#[from] toml::ser::Error), + #[cfg(feature = "notifications")] + #[error(transparent)] + Notify(#[from] notify_rust::error::Error), + + // Rust #[error(transparent)] Io(#[from] std::io::Error), + + #[error(transparent)] + SystemTime(#[from] std::time::SystemTimeError), } -- cgit v1.2.3