bfcc117a by Barry

Turned on the error handling in commandhandler

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