Replaced traceback calls to use logging.exception where applicable.

This commit is contained in:
Lance Stout
2010-07-26 21:02:25 -04:00
parent 241aba8c76
commit c8989c04f3
4 changed files with 8 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ from .. xmlstream.stanzabase import StanzaBase
from xml.etree import cElementTree as ET
from . error import Error
from .. exceptions import XMPPError
import logging
import traceback
import sys
@@ -29,6 +30,7 @@ class RootStanza(StanzaBase):
self['error']['text'] = "SleekXMPP got into trouble."
else:
self['error']['text'] = traceback.format_tb(e.__traceback__)
logging.exception('Error handling {%s}%s stanza' % (self.namespace, self.name))
self.send()
# all jabber:client root stanzas should have the error plugin