Browse Source

add exception print

liuyang 8 years ago
parent
commit
b72e48f306
1 changed files with 2 additions and 1 deletions
  1. 2 1
      wxbot.py

+ 2 - 1
wxbot.py

@@ -13,7 +13,7 @@ import urllib
 import time
 import re
 import random
-
+from traceback import format_exc
 from requests.exceptions import ConnectionError, ReadTimeout
 import HTMLParser
 
@@ -635,6 +635,7 @@ class WXBot:
                 self.schedule()
             except:
                 print '[ERROR] Except in proc_msg'
+                print format_exc()
             check_time = time.time() - check_time
             if check_time < 0.8:
                 time.sleep(1 - check_time)