diff options
author | Lance Stout <lancestout@gmail.com> | 2010-12-17 10:44:32 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-12-17 10:44:32 -0500 |
commit | 506eccf84d86ccf428e1edd8092fdac46f1633fe (patch) | |
tree | f4282a2b58e41bfe99d403873098263bbeaafb44 /sleekxmpp | |
parent | 53a5026301b6f6e842fa29b52bef1721e068eddf (diff) | |
parent | 982bf3b2ecba86a76badf8cacbe82a8f5fc00b80 (diff) | |
download | slixmpp-506eccf84d86ccf428e1edd8092fdac46f1633fe.tar.gz slixmpp-506eccf84d86ccf428e1edd8092fdac46f1633fe.tar.bz2 slixmpp-506eccf84d86ccf428e1edd8092fdac46f1633fe.tar.xz slixmpp-506eccf84d86ccf428e1edd8092fdac46f1633fe.zip |
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/stanza/rootstanza.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sleekxmpp/stanza/rootstanza.py b/sleekxmpp/stanza/rootstanza.py index 6975c72a..777314b9 100644 --- a/sleekxmpp/stanza/rootstanza.py +++ b/sleekxmpp/stanza/rootstanza.py @@ -54,16 +54,17 @@ class RootStanza(StanzaBase): e.extension_args) self['error'].append(extxml) self['error']['type'] = e.etype + self.send() else: - # We probably didn't raise this on purpose, so send a traceback + # We probably didn't raise this on purpose, so send an error stanza self['error']['condition'] = 'undefined-condition' - if sys.version_info < (3, 0): - self['error']['text'] = "SleekXMPP got into trouble." - else: - self['error']['text'] = traceback.format_tb(e.__traceback__) - log.exception('Error handling {%s}%s stanza' % - (self.namespace, self.name)) - self.send() - + self['error']['text'] = "SleekXMPP got into trouble." + self.send() + # log the error + log.exception('Error handling {%s}%s stanza' % + (self.namespace, self.name)) + # Finally raise the exception, so it can be handled (or not) + # at a higher level + raise e register_stanza_plugin(RootStanza, Error) |