diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 9337556..ae4aa26 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,5 +1,6 @@ use std::{ collections::{HashMap, VecDeque}, + fmt, num::ParseIntError, str::Utf8Error, sync::Arc, @@ -35,8 +36,13 @@ pub enum DeserializeError { // not used by crate (yet), but may be used by consumers implementing FromElement #[error("unexpected element: {0:?}")] UnexpectedElement(Element), + #[error("attribute `{0}` is an empty string")] + AttributeEmptyString(String), + #[error("empty string")] + EmptyString, } +// TODO: add error context (usually the stanza) #[derive(Error, Debug, Clone)] pub enum Error { #[error("io: {0}")] |