Catch exceptions when calling populate_handler

darcs-hash:20071106175514-86b55-3e1da59ad7eec5c1ef28f1fe43f9cbe80f40a866.gz
This commit is contained in:
David Rousselie
2007-11-06 18:55:14 +01:00
parent e192c2454e
commit a1f715115b

View File

@@ -216,7 +216,14 @@ class AccountManager(object):
unicode(from_jid.bare())))
if hasattr(_account, "populate_handler"):
try:
getattr(_account, "populate_handler")()
except Exception, exception:
type, value, stack = sys.exc_info()
self.__logger.error("Error in timer thread\n%s\n%s"
% (exception, "".join(traceback.format_exception
(type, value, stack, 5))))
return self.send_error_from_account(_account, exception)
if first_account:
# component subscribe user presence when registering the first