forked from platypush/platypush
Wrap self.on_message in a try/except block
This commit is contained in:
parent
4c2302a534
commit
0a7722d858
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ class Bus(object):
|
|||
.format(int(time.time()-msg.timestamp), msg))
|
||||
continue
|
||||
|
||||
try:
|
||||
self.on_message(msg)
|
||||
except Exception as e:
|
||||
logger.error('Error on processing message {}'.format(msg))
|
||||
logger.exception(e)
|
||||
|
||||
if isinstance(msg, StopEvent) and msg.targets_me():
|
||||
logger.info('Received STOP event on the bus')
|
||||
|
|
Loading…
Reference in a new issue