diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-18 01:30:07 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-18 01:58:08 -0400 |
commit | dd7ef574e84ca6c1a548422904c6865048ae8e30 (patch) | |
tree | dbefd8cd140dd3ace35097f34e0796c31fd3d709 /src/error.rs | |
parent | 777b810db4675305854c373dcd57aedc40061e5d (diff) | |
download | rbw-dd7ef574e84ca6c1a548422904c6865048ae8e30.tar.gz rbw-dd7ef574e84ca6c1a548422904c6865048ae8e30.zip |
implement editing a string in a text editor
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs index 71c8285..8c253c9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -9,9 +9,19 @@ pub enum Error { #[snafu(display("failed to decrypt: {}", source))] Decrypt { source: block_modes::BlockModeError }, - #[snafu(display("failed to parse pinentry output ({:?})", out,))] + #[snafu(display("failed to parse pinentry output ({:?})", out))] FailedToParsePinentry { out: String }, + #[snafu(display( + "failed to run editor {}: {:?}", + editor.to_string_lossy(), + res + ))] + FailedToRunEditor { + editor: std::path::PathBuf, + res: std::process::ExitStatus, + }, + // no Error impl // #[snafu(display("failed to expand with hkdf: {}", source))] // HkdfExpand { source: hkdf::InvalidLength }, @@ -30,6 +40,9 @@ pub enum Error { #[snafu(display("invalid cipherstring"))] InvalidCipherString, + #[snafu(display("invalid value for $EDITOR: {}", editor.to_string_lossy()))] + InvalidEditor { editor: std::ffi::OsString }, + #[snafu(display("invalid mac"))] InvalidMac, |