From: Jeremy Stanley Date: Mon, 13 May 2019 19:23:51 +0000 (+0000) Subject: Provide normal error if command raises exception X-Git-Tag: 0.0.1~8 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=0f70e3a057151497d7d99711660e8649485ef6c2;p=mudpy.git 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. --- 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: