summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
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}