diff --git a/src/error.rs b/src/error.rs index e5883c9..2af1b3a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -21,12 +21,19 @@ use xmpp_parsers::{Error as ParserError, FullJid, Jid}; #[derive(Debug)] pub enum Error { + /// Raised when editing an occupant with a non-matching session JID. MismatchJids(Jid, Jid), + /// Raised when a new occupant tries to use a nickname already assigned in the room. NickAlreadyAssigned(String), + /// Raised when editing or fetching an occupant with a session that isn't associated with the + /// occupant. NonexistantSession(FullJid), SessionAlreadyExists(FullJid), + /// Raised when fetching an occupant with a nickname that isn't assigned in the room. ParticipantNotFound(String), + /// TokioXMPP errors Xmpp(Box), + /// Parser errors Parser(Box), }