diff bridge.py @ 176:bca516d04bdb

attach traceback to error message when joining IRC or XMPP fails Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Mon, 08 Feb 2010 18:54:54 +0100
parents 8378da7844f2
children f6c6708c6c0e
line wrap: on
line diff
--- 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')