Add exception details to EventManager error log

This commit is contained in:
Calum Lind 2013-02-04 16:55:25 +00:00
parent b0d78da13b
commit b9311d4b57
1 changed files with 2 additions and 2 deletions

View File

@ -55,8 +55,8 @@ class EventManager(component.Component):
#log.debug("Running handler %s for event %s with args: %s", event.name, handler, event.args) #log.debug("Running handler %s for event %s with args: %s", event.name, handler, event.args)
try: try:
handler(*event.args) handler(*event.args)
except: except Exception, e:
log.error("Event handler %s failed in %s", event.name, handler) log.error("Event handler %s failed in %s with exception %s", event.name, handler, e)
def register_event_handler(self, event, handler): def register_event_handler(self, event, handler):
""" """