improve logging of error from callback

This commit is contained in:
Noah Levitt
2015-07-20 16:05:41 -07:00
parent ae7f36e372
commit 44902a249c

View File

@@ -230,7 +230,7 @@ class WebSocketApp(object):
try:
callback(self, *args)
except Exception as e:
error(e)
error("error from callback {}: {}".format(callback, e))
if isEnabledForDebug():
_, _, tb = sys.exc_info()
traceback.print_tb(tb)