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:
commit
488fb745b7
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import threading
|
||||
import traceback
|
||||
import re
|
||||
import sys
|
||||
import six
|
||||
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user