diff options
-rw-r--r-- | slixmpp/exceptions.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/slixmpp/exceptions.py b/slixmpp/exceptions.py index 0486666e..5ec6e7e1 100644 --- a/slixmpp/exceptions.py +++ b/slixmpp/exceptions.py @@ -101,3 +101,17 @@ class IqError(XMPPError): #: The :class:`~slixmpp.stanza.iq.Iq` error result stanza. self.iq = iq + + +class PresenceError(XMPPError): + """ + An exception raised in specific circumstances for presences + of type 'error' received. + """ + def __init__(self, pres): + super().__init__( + condition=pres['error']['condition'], + text=pres['error']['text'], + etype=pres['error']['type'], + ) + self.presence = pres |