output error upon calc error
This commit is contained in:
parent
deeaf9ecca
commit
987854e900
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user