1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #359 from Yolley/master

Informative exception message for better exception handling
This commit is contained in:
FrankWang 2017-07-07 10:45:23 +08:00 committed by GitHub
commit 488fb745b7

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import threading import threading
import traceback
import re import re
import sys import sys
import six import six
@ -56,8 +57,8 @@ class WorkerThread(threading.Thread):
self.done_event.set() self.done_event.set()
except Queue.Empty: except Queue.Empty:
pass pass
except: except Exception as e:
logger.debug("Exception occurred") logger.error(type(e).__name__ + " occurred, args=" + str(e.args) + "\n" + traceback.format_exc())
self.exc_info = sys.exc_info() self.exc_info = sys.exc_info()
self.exception_event.set() self.exception_event.set()