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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user