projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Be explicit when show result raises an exception
[mudpy.git]
/
lib
/
mudpy
/
misc.py
diff --git
a/lib/mudpy/misc.py
b/lib/mudpy/misc.py
index
7e8e612
..
9e6dd99
100644
(file)
--- a/
lib/mudpy/misc.py
+++ b/
lib/mudpy/misc.py
@@
-2230,8
+2230,9
@@
def command_show(actor, parameters):
else:
try:
message = repr(eval(" ".join(arguments[1:])))
else:
try:
message = repr(eval(" ".join(arguments[1:])))
- except:
- message = "Your expression raised an exception!"
+ except Exception as e:
+ message = ("$(red)Your expression raised an exception...$(eol)"
+ "$(eol)$(bld)%s$(nrm)" % e)
elif arguments[0] == "log":
if len(arguments) == 4:
if re.match("^\d+$", arguments[3]) and int(arguments[3]) >= 0:
elif arguments[0] == "log":
if len(arguments) == 4:
if re.match("^\d+$", arguments[3]) and int(arguments[3]) >= 0: