From 97203d3edbca89b7186c10ba52fe4378f08ee3e0 Mon Sep 17 00:00:00 2001 From: Chris Harding Date: Tue, 15 Aug 2017 23:38:43 +0000 Subject: [PATCH] Print error messages for uncaught module exceptions --- halibot/halobject.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/halibot/halobject.py b/halibot/halobject.py index 448f05f..d08f0cc 100644 --- a/halibot/halobject.py +++ b/halibot/halobject.py @@ -1,4 +1,4 @@ -import logging +import logging, traceback import asyncio import inspect import copy @@ -68,8 +68,10 @@ def sync_send_to(self, msg, dests): return r async def _receive(self, msg): - self.receive(msg) - + try: + self.receive(msg) + except Exception as e: + traceback.print_exc() def receive(self, msg): pass