summaryrefslogtreecommitdiffstats
path: root/src/fail.rs
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2020-02-05 21:45:51 +0100
committerrabite <rabite@posteo.de>2020-02-05 21:45:51 +0100
commita6c829e1439dd1a50eb3de090bb13990a1eaf932 (patch)
tree5fd5c7b6474c07d041d3c8d09a06b631b2c7738e /src/fail.rs
parentaa091b69c8faddc9515a47ad8e66d4c89a91ac05 (diff)
buggy super-fast crazy stuffbuggy-speed
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 38a66d0..1abdea7 100644
--- a/src/fail.rs
+++ b/src/fail.rs
@@ -30,6 +30,8 @@ pub enum HError {
ChannelRecvError{#[cause] error: std::sync::mpsc::RecvError},
#[fail(display = "Channel failed")]
ChannelSendError,
+ #[fail(display = "Timer ran out while waiting for message on channel!")]
+ ChannelRecvTimeout(#[cause] std::sync::mpsc::RecvTimeoutError),
#[fail(display = "Previewer failed on file: {}", file)]
PreviewFailed{file: String},
#[fail(display = "StalePreviewer for file: {}", file)]
@@ -292,6 +294,13 @@ impl From<std::sync::mpsc::RecvError> for HError {
}
}
+impl From<std::sync::mpsc::RecvTimeoutError> for HError {
+ fn from(error: std::sync::mpsc::RecvTimeoutError) -> Self {
+ let err = HError::ChannelRecvTimeout(error);
+ err
+ }
+}
+
impl<T> From<std::sync::mpsc::SendError<T>> for HError {
fn from(_error: std::sync::mpsc::SendError<T>) -> Self {
let err = HError::ChannelSendError;