From 50bb7546b0d3d3192489421f3f671335275615a6 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 28 May 2020 23:11:03 -0400 Subject: improve cipherstring parsing errors --- src/error.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 5a95fec..131d5b9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -40,8 +40,8 @@ pub enum Error { #[snafu(display("invalid base64"))] InvalidBase64 { source: base64::DecodeError }, - #[snafu(display("invalid cipherstring"))] - InvalidCipherString, + #[snafu(display("invalid cipherstring: {}", reason))] + InvalidCipherString { reason: String }, #[snafu(display("invalid value for $EDITOR: {}", editor.to_string_lossy()))] InvalidEditor { editor: std::ffi::OsString }, @@ -164,6 +164,9 @@ pub enum Error { providers: Vec, }, + #[snafu(display("unimplemented cipherstring type: {}", ty))] + UnimplementedCipherStringType { ty: String }, + #[snafu(display("error writing to pinentry stdin"))] WriteStdin { source: tokio::io::Error }, } -- cgit v1.2.3-54-g00ecf