From 9c561014f3c4278c0991290c898713f8e9c928e8 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 3 Apr 2025 03:09:35 +0100 Subject: feat: xml logging --- src/error.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/error.rs') 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}")] -- cgit