From 328cabead6a9283ad82f7933ba22eb91957f6db9 Mon Sep 17 00:00:00 2001 From: Yolley Date: Tue, 20 Jun 2017 15:45:01 +0300 Subject: [PATCH 1/2] Update util.py --- telebot/util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/telebot/util.py b/telebot/util.py index 8e04267..42ffd32 100644 --- a/telebot/util.py +++ b/telebot/util.py @@ -4,6 +4,7 @@ import threading import re import sys import six +import traceback from six import string_types # Python3 queue support. @@ -56,8 +57,8 @@ class WorkerThread(threading.Thread): self.done_event.set() except Queue.Empty: pass - except: - logger.debug("Exception occurred") + except Exception as e: + logger.error(type(e).__name__ + " occurred, args=" + str(e.args) + "\n" + traceback.format_exc()) self.exc_info = sys.exc_info() self.exception_event.set() From 242456d92bf5b06fad561e5a54f038d6dca6a32e Mon Sep 17 00:00:00 2001 From: Yolley Date: Tue, 20 Jun 2017 15:45:18 +0300 Subject: [PATCH 2/2] Update util.py --- telebot/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telebot/util.py b/telebot/util.py index 42ffd32..f524577 100644 --- a/telebot/util.py +++ b/telebot/util.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import threading +import traceback import re import sys import six -import traceback from six import string_types # Python3 queue support.