mrshu / brutal-plugins

A set of plugins for brutal, the mighty chatbot
Apache License 2.0
4 stars 2 forks source link

Eval: notify the user when there was a syntax error #24

Closed mrshu closed 9 years ago

mrshu commented 9 years ago

If one runs the following query:

!eval abs(sin(radians(270))

It will just silently pass.

It's obvious that there is a paren missing and Python's response is generally a SyntaxError. I believe we should at least let the user (or whoever might be asking) know that something is wrong with their query.

mrshu commented 9 years ago

@JakubNvk This should be a fairly easy one and you can try to learn something about Exceptions in Python so I'm assigning this one to you.

pepol commented 9 years ago

@mrshu :+1:

mrshu commented 9 years ago

@JakubNvk ping

mrshu commented 9 years ago

Should be good now (cc @Adman )