diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs index d98e716..13c268d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,9 +1,14 @@ use thiserror::Error; +use ::parser::ParseErrorReason; + #[derive(Debug, Clone, Error)] pub enum VObjectErrorKind { - #[error("Parser error: {}", _0)] - ParserError(String), + #[error("failed to parse: {}", source)] + Parse { + #[from] + source: ParseErrorReason, + }, #[error("Not a Vcard")] NotAVCard, |