summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2024-09-25 15:13:34 +0200
committerfxqnlr <[email protected]>2024-09-25 15:13:34 +0200
commitd44041040d755306c39d6de8da5b42d7ded6808c (patch)
treed664c15e014aa36dc5735ec4be4919866fb6a9e5 /src/error.rs
parent0ed94b3f011a2d3c22bdc4affb502720be22c371 (diff)
downloadarbs-d44041040d755306c39d6de8da5b42d7ded6808c.tar
arbs-d44041040d755306c39d6de8da5b42d7ded6808c.tar.gz
arbs-d44041040d755306c39d6de8da5b42d7ded6808c.zip
added notifications and improved stuff
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs17
1 files changed, 17 insertions, 0 deletions
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 @@
1use tracing::error;
2
1pub type Result<T> = std::result::Result<T, Error>; 3pub type Result<T> = std::result::Result<T, Error>;
2 4
3#[derive(Debug, thiserror::Error)] 5#[derive(Debug, thiserror::Error)]
@@ -17,6 +19,10 @@ pub enum Error {
17 #[error("Requested backup not found")] 19 #[error("Requested backup not found")]
18 BackupNotFound, 20 BackupNotFound,
19 21
22 // Utils
23 #[error("System directory not found")]
24 NoSysDir,
25
20 // Packages 26 // Packages
21 #[error("Unknown Package Manger Output")] 27 #[error("Unknown Package Manger Output")]
22 UnknownOutput, 28 UnknownOutput,
@@ -26,11 +32,22 @@ pub enum Error {
26 32
27 // Deps 33 // Deps
28 #[error(transparent)] 34 #[error(transparent)]
35 Config(#[from] config::ConfigError),
36
37 #[error(transparent)]
29 SerdeJson(#[from] serde_json::Error), 38 SerdeJson(#[from] serde_json::Error),
30 39
31 #[error(transparent)] 40 #[error(transparent)]
32 TomlSerialize(#[from] toml::ser::Error), 41 TomlSerialize(#[from] toml::ser::Error),
33 42
43 #[cfg(feature = "notifications")]
44 #[error(transparent)]
45 Notify(#[from] notify_rust::error::Error),
46
47 // Rust
34 #[error(transparent)] 48 #[error(transparent)]
35 Io(#[from] std::io::Error), 49 Io(#[from] std::io::Error),
50
51 #[error(transparent)]
52 SystemTime(#[from] std::time::SystemTimeError),
36} 53}