bfcc117a by Barry

Turned on the error handling in commandhandler

1 parent 4112e223
...@@ -32,7 +32,7 @@ class CommandHandler(object): ...@@ -32,7 +32,7 @@ class CommandHandler(object):
32 locals()['tokens'] = tokens 32 locals()['tokens'] = tokens
33 33
34 locals()['next_command'] = None 34 locals()['next_command'] = None
35 # try: 35 try:
36 if cmd in utils.load_object_from_file('rooms/' + players[id]["room"] + '.json').get('exits'): 36 if cmd in utils.load_object_from_file('rooms/' + players[id]["room"] + '.json').get('exits'):
37 params = cmd + " " + params.lower().strip() 37 params = cmd + " " + params.lower().strip()
38 cmd = "go" 38 cmd = "go"
...@@ -51,10 +51,10 @@ class CommandHandler(object): ...@@ -51,10 +51,10 @@ class CommandHandler(object):
51 exec(f.read()) 51 exec(f.read())
52 del ldict 52 del ldict
53 return True 53 return True
54 # except Exception as e: 54 except Exception as e:
55 # print('Something happened...') 55 print('Something happened...')
56 # print(e) 56 print(e)
57 # mud.send_message(id, "Unknown command '{}'".format(cmd)) 57 mud.send_message(id, "Unknown command '{}'".format(cmd))
58 # return False 58 return False
59 59
60 60
......