summaryrefslogtreecommitdiffstats
path: root/src/fail.rs
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-03-10 16:41:57 +0100
committerrabite <rabite@posteo.de>2019-03-10 16:41:57 +0100
commitb332c4fb116302117b584cd0cbf440266e00e17e (patch)
tree3d307c7b70d4f2d9c8547d9073bb684c37ef6de6 /src/fail.rs
parent9fcc12f464132d75660f331de5588ba454327fa3 (diff)
crash fix
Diffstat (limited to 'src/fail.rs')
-rw-r--r--src/fail.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fail.rs b/src/fail.rs
index 1aa1d42..80865e0 100644
--- a/src/fail.rs
+++ b/src/fail.rs
@@ -52,6 +52,8 @@ pub enum HError {
WrongWidgetError{got: String, wanted: String},
#[fail(display = "Strip Prefix Error: {}", error)]
StripPrefixError{#[cause] error: std::path::StripPrefixError},
+ #[fail(display = "INofify failed: {}", error)]
+ INotifyError{#[cause] error: notify::Error},
}
impl HError {
@@ -154,3 +156,10 @@ impl From<std::path::StripPrefixError> for HError {
HError::StripPrefixError{error: error}
}
}
+
+impl From<notify::Error> for HError {
+ fn from(error: notify::Error) -> Self {
+ dbg!(&error);
+ HError::INotifyError{error: error}
+ }
+}