Make error messages easier to read.
This commit is contained in:
parent
4ba7a4707f
commit
821b5f0dae
1 changed files with 3 additions and 3 deletions
|
@ -15,10 +15,10 @@ use thiserror::Error;
|
||||||
/// Enum that wraps the different error types that this crate can return
|
/// Enum that wraps the different error types that this crate can return
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum OpenpgpCardError {
|
pub enum OpenpgpCardError {
|
||||||
#[error("Error interacting with smartcard {0}")]
|
#[error("Error interacting with smartcard: {0}")]
|
||||||
Smartcard(SmartcardError),
|
Smartcard(SmartcardError),
|
||||||
|
|
||||||
#[error("OpenPGP card error status {0}")]
|
#[error("OpenPGP card error status: {0}")]
|
||||||
OcStatus(OcErrorStatus),
|
OcStatus(OcErrorStatus),
|
||||||
|
|
||||||
#[error("Command too long ({0} bytes)")]
|
#[error("Command too long ({0} bytes)")]
|
||||||
|
@ -27,7 +27,7 @@ pub enum OpenpgpCardError {
|
||||||
#[error("Unexpected response length: {0}")]
|
#[error("Unexpected response length: {0}")]
|
||||||
ResponseLength(usize),
|
ResponseLength(usize),
|
||||||
|
|
||||||
#[error("Internal error {0}")]
|
#[error("Internal error: {0}")]
|
||||||
InternalError(anyhow::Error),
|
InternalError(anyhow::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue