From 686a9a0bd905c7e00a38c5c2c7bf0f427d6d3f0e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 20 May 2005 17:30:29 +0000 Subject: [PATCH] when an error occure while Process()ing xmpp, we print the TB so it's easier to debug --- src/common/connection.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 0babbdd5d..0dffe6cb3 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -21,6 +21,7 @@ import sys import os import time import sre +import traceback from calendar import timegm import common.xmpp @@ -960,14 +961,14 @@ class Connection: try: self.connection.Process(timeout) except: - gajim.log.debug('error appeared while processing xmpp: ' + \ - str(sys.exc_info()[1])) + gajim.log.debug('error appeared while processing xmpp:') + traceback.print_exc() self.connected = 0 self.dispatch('STATUS', 'offline') try: self.connection.disconnect() except: - gajim.log.debug('error appeared while processing xmpp: ' + \ - str(sys.exc_info()[1])) + gajim.log.debug('error appeared while processing xmpp:') + traceback.print_exc() self.connection = None # END GajimCore