Better trace information when an exception is caught.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Edward Z. Yang
2011-01-27 19:46:29 -05:00
committed by Nicolas Sebrecht
parent fa60f3f9b7
commit e506442996
3 changed files with 15 additions and 12 deletions

View File

@ -24,6 +24,7 @@ from threading import Event, Lock
import os
from Queue import Queue, Empty
import sys
import traceback
class SigListener(Queue):
def __init__(self):
@ -191,7 +192,7 @@ class AccountSynchronizationMixin:
raise
except:
self.ui.warn("Error occured attempting to sync account " + self.name \
+ ": " + str(sys.exc_info()[1]))
+ ": " + traceback.format_exc())
finally:
self.ui.acctdone(self.name)
@ -207,7 +208,7 @@ class AccountSynchronizationMixin:
raise
except:
self.ui.warn("Error occured attempting to sync account " + self.name \
+ ": " + str(sys.exc_info()[1]))
+ ": " + traceback.format_exc())
finally:
looping = self.sleeper(siglistener) != 2
self.ui.acctdone(self.name)