Make error messages easier to read.

This commit is contained in:
Heiko Schaefer 2021-08-28 17:54:39 +02:00
parent 4ba7a4707f
commit 821b5f0dae

View file

@ -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),
}