X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fcommand.py;fp=mudpy%2Fcommand.py;h=39e0a8388c5c10265664fff2bfeb7bb42ee6b1d7;hp=2b20b1a6d4b818e7be8f8efc149f09d99e1c8c13;hb=f6f7c26e115c61153017b50660d0561f854a8e20;hpb=edddf0499e537e611ac1b8de5d960ce13b434d3e diff --git a/mudpy/command.py b/mudpy/command.py index 2b20b1a..39e0a83 100644 --- a/mudpy/command.py +++ b/mudpy/command.py @@ -6,6 +6,7 @@ import random import re +import traceback import unicodedata import mudpy @@ -117,8 +118,13 @@ def error(actor, input_data): else: message = "Arglebargle, glop-glyf!?!" - # send the error message - actor.send(message) + # try to send the error message, and log if we can't + try: + actor.send(message) + except Exception: + mudpy.misc.log( + 'Sending a command error to user %s raised exception...\n%s' % ( + actor.owner.account.get("name"), traceback.format_exc())) def halt(actor, parameters):