From 0f70e3a057151497d7d99711660e8649485ef6c2 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 13 May 2019 19:23:51 +0000 Subject: [PATCH] Provide normal error if command raises exception If a attempting to execute a user-supplied command results in a Python exception, return the normal error message string to the user (in addition to logging the exception and traceback). This way, normal users won't see any difference between unknown/invalid commands and broken ones. --- mudpy/misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mudpy/misc.py b/mudpy/misc.py index f99fac3..63e4df4 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -1911,6 +1911,7 @@ def handler_active(user): 'exception...\n%s' % ( input_data, actor.owner.account.get("name"), traceback.format_exc())) + mudpy.command.error(actor, input_data) # if the command was not run, give an error if not ran: -- 2.11.0