summaryrefslogtreecommitdiff
path: root/sleekxmpp/exceptions.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-05-31 12:48:43 -0700
committerLance Stout <lancestout@gmail.com>2011-06-01 15:17:22 -0700
commit8aa4396e4490a964e3e1b1a5e6f555e97c16fd3d (patch)
treeed58dc66611c99710a404fe5795f9f3d4364f777 /sleekxmpp/exceptions.py
parent14693233504383d4df0ed092c870d5d7baea6538 (diff)
downloadslixmpp-8aa4396e4490a964e3e1b1a5e6f555e97c16fd3d.tar.gz
slixmpp-8aa4396e4490a964e3e1b1a5e6f555e97c16fd3d.tar.bz2
slixmpp-8aa4396e4490a964e3e1b1a5e6f555e97c16fd3d.tar.xz
slixmpp-8aa4396e4490a964e3e1b1a5e6f555e97c16fd3d.zip
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'.
Diffstat (limited to 'sleekxmpp/exceptions.py')
-rw-r--r--sleekxmpp/exceptions.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/sleekxmpp/exceptions.py b/sleekxmpp/exceptions.py
index 4727f0c6..72c0860a 100644
--- a/sleekxmpp/exceptions.py
+++ b/sleekxmpp/exceptions.py
@@ -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