# HG changeset patch # User Charly COSTE # Date 1265651694 -3600 # Node ID bca516d04bdb8a65a43c433abb173487993cf720 # Parent 8378da7844f2d66097341933f4d81f0bfc117d40 attach traceback to error message when joining IRC or XMPP fails Signed-off-by: Charly COSTE diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -102,8 +102,8 @@ class Bridge: else: raise Exception('[Error] unknown error for "'+self.bot.nickname+'" on bridge "'+str(self)+'"') except: - traceback.print_exc() - self.bot.error('[Error] failed to connect to the IRC chan of bridge "'+str(self)+'", stopping bridge', send_to_admins=True) + trace = traceback.format_exc() + self.bot.error('[Error] failed to connect to the IRC chan of bridge "'+str(self)+'", stopping bridge\n'+trace, send_to_admins=True) self.stop(message='failed to connect to the IRC chan') @@ -133,8 +133,8 @@ class Bridge: except xmpp.muc.RemoteServerNotFound: self._RemoteServerNotFound_handler() except: - traceback.print_exc() - self.bot.error('[Error] failed to connect to the XMPP room of bridge "'+str(self)+'", stopping bridge', send_to_admins=True) + trace = traceback.format_exc() + self.bot.error('[Error] failed to connect to the XMPP room of bridge "'+str(self)+'", stopping bridge\n'+trace, send_to_admins=True) self.stop(message='failed to connect to the XMPP room')