From 821b5f0dae2fa81139165184cc64e43e51c44aa4 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sat, 28 Aug 2021 17:54:39 +0200 Subject: [PATCH] Make error messages easier to read. --- openpgp-card/src/errors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpgp-card/src/errors.rs b/openpgp-card/src/errors.rs index 652fcdd..34cb972 100644 --- a/openpgp-card/src/errors.rs +++ b/openpgp-card/src/errors.rs @@ -15,10 +15,10 @@ use thiserror::Error; /// Enum that wraps the different error types that this crate can return #[derive(Error, Debug)] pub enum OpenpgpCardError { - #[error("Error interacting with smartcard {0}")] + #[error("Error interacting with smartcard: {0}")] Smartcard(SmartcardError), - #[error("OpenPGP card error status {0}")] + #[error("OpenPGP card error status: {0}")] OcStatus(OcErrorStatus), #[error("Command too long ({0} bytes)")] @@ -27,7 +27,7 @@ pub enum OpenpgpCardError { #[error("Unexpected response length: {0}")] ResponseLength(usize), - #[error("Internal error {0}")] + #[error("Internal error: {0}")] InternalError(anyhow::Error), }