summaryrefslogtreecommitdiffstats
path: root/src/fail.rs
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-03-11 21:21:47 +0100
committerrabite <rabite@posteo.de>2019-03-11 21:21:47 +0100
commitd3a385ea754e47ca462c84a9aef2e40306e2997c (patch)
treec3f20597ab37cc1c61fed87ae98ff1afa953577e /src/fail.rs
parent9cc1ce1a44850f65f84db1c6fd9356013d53e5ea (diff)
save minibuffer history
Diffstat (limited to 'src/fail.rs')
-rw-r--r--src/fail.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fail.rs b/src/fail.rs
index 16a6028..1b1544f 100644
--- a/src/fail.rs
+++ b/src/fail.rs
@@ -55,7 +55,11 @@ pub enum HError {
#[fail(display = "INofify failed: {}", error)]
INotifyError{#[cause] error: notify::Error},
#[fail(display = "Tags not loaded yet")]
- TagsNotLoadedYetError
+ TagsNotLoadedYetError,
+ #[fail(display = "Input cancelled!")]
+ MiniBufferCancelledInput,
+ #[fail(display = "Empty input!")]
+ MiniBufferEmptyInput
}
impl HError {
@@ -78,6 +82,12 @@ impl HError {
pub fn tags_not_loaded<T>() -> HResult<T> {
Err(HError::TagsNotLoadedYetError)
}
+ pub fn minibuffer_cancel<T>() -> HResult<T> {
+ Err(HError::MiniBufferCancelledInput)
+ }
+ pub fn minibuffer_empty<T>() -> HResult<T> {
+ Err(HError::MiniBufferEmptyInput)
+ }
}
pub trait ErrorLog where Self: Sized {