瀏覽代碼

hopefully catch command exceptions properly this time

tags/v0.1
Ben Kurtovic 13 年之前
父節點
當前提交
20ffe4b55a
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      irc/command_handler.py

+ 5
- 1
irc/command_handler.py 查看文件

@@ -58,5 +58,9 @@ def check(hook, data):
for command in commands: for command in commands:
if hook in command.get_hooks(): if hook in command.get_hooks():
if command.check(data): if command.check(data):
command.process(data)
try:
command.process(data)
except:
print "Error executing command:"
traceback.print_exc() # catch exceptions and print them
break break

Loading…
取消
儲存