improve logging
This commit is contained in:
parent
23a4f53e34
commit
9ce111c1ec
8
bot.py
8
bot.py
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
import teambot, sys, os
|
||||
import teambot, sys, os, traceback
|
||||
|
||||
class Circles(teambot.Handler):
|
||||
def __init__(self, bot):
|
||||
|
@ -40,9 +40,11 @@ class Circles(teambot.Handler):
|
|||
try:
|
||||
self.cmd[cmd](self,c,n,m)
|
||||
except BaseException as e:
|
||||
self.say(c,n+": Usage: "+self.help[cmd])
|
||||
self.say(c,"Invalid Input, do {}help {} to see syntax".format(self.prefix, cmd))
|
||||
print('error', e)
|
||||
print(sys.exc_info())
|
||||
n = sys.exc_info()
|
||||
print(n, "Inp:", m)
|
||||
traceback.print_tb(n[2])
|
||||
try:
|
||||
for i in self.raw:
|
||||
self.raw[i](self,c,n,m)
|
||||
|
|
Loading…
Reference in New Issue