comparison src/tmp/wokkel/rsm.py @ 1782:514ade866261

tmp (wokkel.rsm): RSMError now inherit from StanzaError, so they are correctly handled by services
author Goffi <goffi@goffi.org>
date Fri, 08 Jan 2016 17:24:32 +0100
parents 0158ab00afea
children e393b96dc553
comparison
equal deleted inserted replaced
1781:0158ab00afea 1782:514ade866261
23 This protocol is specified in 23 This protocol is specified in
24 U{XEP-0059<http://xmpp.org/extensions/xep-0059.html>}. 24 U{XEP-0059<http://xmpp.org/extensions/xep-0059.html>}.
25 """ 25 """
26 26
27 from twisted.words.xish import domish 27 from twisted.words.xish import domish
28 from twisted.words.protocols.jabber import error
28 29
29 import pubsub 30 import pubsub
30 import copy 31 import copy
31 32
32 33
33 NS_RSM = 'http://jabber.org/protocol/rsm' 34 NS_RSM = 'http://jabber.org/protocol/rsm'
34 35
35 36
36 class RSMError(Exception): 37 class RSMError(error.StanzaError):
37 """ 38 """
38 RSM error. 39 RSM error.
39 """ 40 """
41 def __init__(self, text=None):
42 error.StanzaError.__init__(self, 'bad-request', text=text)
40 43
41 44
42 class RSMNotFoundError(Exception): 45 class RSMNotFoundError(Exception):
43 """ 46 """
44 An expected RSM element has not been found. 47 An expected RSM element has not been found.