diff --git a/calc.py b/calc.py index a459322735..d2c9a3e1a6 100644 --- a/calc.py +++ b/calc.py @@ -23,7 +23,7 @@ @commands('c', 'calc') @example('.c 5 + 3', '8') def c(bot, trigger): - """Google calculator.""" + """Evaluate some calculation.""" if not trigger.group(2): return bot.reply("Nothing to calculate.") # Account for the silly non-Anglophones and their silly radix point. @@ -32,10 +32,9 @@ def c(bot, trigger): result = str(eval_equation(eqn)) except ZeroDivisionError: result = "Division by zero is not supported in this universe." - except Exception: - result = ("Sorry, I can't calculate that with this command. " - "I might have another one that can. " - "Use .commands for a list.") + except Exception as e: + result = "{error}: {msg}".format( + error=type(e), msg=e) bot.reply(result)