DrBotIRC: better printing of exceptions
This commit is contained in:
parent
2dd27dde4b
commit
0b51eb88a8
@ -25,6 +25,7 @@ from SimpleXMLRPCServer import SimpleXMLRPCServer
|
|||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import thread
|
import thread
|
||||||
|
import traceback
|
||||||
|
|
||||||
from extlib import irclib
|
from extlib import irclib
|
||||||
|
|
||||||
@ -200,7 +201,9 @@ class DrBotIRC(irclib.IRC):
|
|||||||
if handler[1](connection, event) == "NO MORE":
|
if handler[1](connection, event) == "NO MORE":
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("exception floated up to DrBotIrc: " + str(e))
|
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||||
|
print("exception floated up to DrBotIrc!")
|
||||||
|
traceback.print_exception(exc_type, exc_value, exc_traceback)
|
||||||
|
|
||||||
def xmlrpc_register_function(self, func, name):
|
def xmlrpc_register_function(self, func, name):
|
||||||
"""Add a method to the XML-RPC interface."""
|
"""Add a method to the XML-RPC interface."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user