output error upon calc error

This commit is contained in:
iou1name 2020-01-31 10:08:11 -05:00
parent deeaf9ecca
commit 987854e900

View File

@ -25,8 +25,8 @@ def c(bot, trigger):
try:
value = numexpr.evaluate(expr, local_dict={}, global_dict={})
value = value.item()
except:
value = "Error. The expression was not understood."
except Exception as e:
value = type(e).__name__ + ': ' + str(e)
return_dict['value'] = value
with multiprocessing.Manager() as manager: