summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/error.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index 8aa98ae..9278f1b 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -5,7 +5,7 @@ use rsasl::mechname::MechanismNameError;
use crate::{
jid::ParseError,
- stanza::{self, ElementError},
+ stanza::{self, ElementError, ElementParseError},
};
#[derive(Debug)]
@@ -22,6 +22,7 @@ pub enum JabberError {
NoType,
IDMismatch,
BindError,
+ ElementParse(ElementParseError),
ParseError,
UnexpectedEnd,
UnexpectedElement,
@@ -87,3 +88,9 @@ impl From<ParseError> for JabberError {
Self::JID(e)
}
}
+
+impl From<ElementParseError> for JabberError {
+ fn from(e: ElementParseError) -> Self {
+ Self::ElementParse(e)
+ }
+}