summaryrefslogtreecommitdiffstats
path: root/src/fail.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fail.rs')
-rw-r--r--src/fail.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fail.rs b/src/fail.rs
index 0f05455..cf5acab 100644
--- a/src/fail.rs
+++ b/src/fail.rs
@@ -105,7 +105,9 @@ pub enum HError {
#[fail(display = "FileBrowser needs to know about all tab's files to run exec!")]
FileBrowserNeedTabFiles,
#[fail(display = "{}", _0)]
- FileError(crate::files::FileError)
+ FileError(crate::files::FileError),
+ #[fail(display = "{}", _0)]
+ Nix(#[cause] nix::Error)
}
impl HError {
@@ -367,6 +369,13 @@ impl From<std::num::ParseIntError> for HError {
}
}
+impl From<nix::Error> for HError {
+ fn from(error: nix::Error) -> Self {
+ let err = HError::Nix(error);
+ err
+ }
+}
+
impl From<std::char::ParseCharError> for HError {
fn from(error: std::char::ParseCharError) -> Self {
let err = HError::ParseCharError(error);