output error upon calc error
This commit is contained in:
parent
deeaf9ecca
commit
987854e900
|
@ -25,8 +25,8 @@ def c(bot, trigger):
|
||||||
try:
|
try:
|
||||||
value = numexpr.evaluate(expr, local_dict={}, global_dict={})
|
value = numexpr.evaluate(expr, local_dict={}, global_dict={})
|
||||||
value = value.item()
|
value = value.item()
|
||||||
except:
|
except Exception as e:
|
||||||
value = "Error. The expression was not understood."
|
value = type(e).__name__ + ': ' + str(e)
|
||||||
return_dict['value'] = value
|
return_dict['value'] = value
|
||||||
|
|
||||||
with multiprocessing.Manager() as manager:
|
with multiprocessing.Manager() as manager:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user