aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-05-12 09:32:21 -0700
committerRyan Huber <rhuber@gmail.com>2015-05-12 09:32:21 -0700
commitf626967ccd913c0dde22002e47a21d8aadbb8640 (patch)
tree49259adf7dfd2f6a3ecf54929b2c12fd4aec5bb1 /wee_slack.py
parent57cb95bf2972f56ca8baf32e3f58bd084d1b95ed (diff)
downloadwee-slack-f626967ccd913c0dde22002e47a21d8aadbb8640.tar.gz
add debug info for exceptions
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index c2e8cb3..37a31ad 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -9,6 +9,7 @@ import re
import urllib
import urlparse
import HTMLParser
+import sys
from websocket import create_connection
# hack to make tests possible.. better way?
@@ -221,6 +222,7 @@ class SlackServer(object):
dbg("Sent {}...".format(message[:100]))
except:
self.failed_message = data
+ dbg("Unexpected error: {}\nSent: {}".format(sys.exc_info()[0], self.failed_message))
self.connected = False
def ping(self):