Begin experimental use of exceptions.

Provides IqTimeout and IqError which are raised when an Iq response
does not arrive in time, or it arrives with type='error'.
This commit is contained in:
Lance Stout
2011-05-31 12:48:43 -07:00
parent 1469323350
commit 8aa4396e44
6 changed files with 32 additions and 21 deletions

View File

@@ -52,3 +52,16 @@ class XMPPError(Exception):
self.extension = extension
self.extension_ns = extension_ns
self.extension_args = extension_args
class IqTimeout(Exception):
"""
An exception which indicates that an IQ request response has not been
received within the alloted time window.
"""
class IqError(Exception):
def __init__(self, iq):
self.iq = iq