problem-specifications
problem-specifications copied to clipboard
Improve error classification
Most of the wordy exercise is satisfying to complete, but getting the errors correct at the end is very frustrating. The errors themselves seem organised in a non sensical way to me, and getting the tests to pass involves making the code worse, which seems like a bad lesson for a student.
I have hopefully improved the messages, so that:
- 'unknown operation' is for when you expected an operator (plus, minus etc), but didn't get one.
- 'syntax error' is for everything else.
I think another option would be to add a third type of error, for when you are expecting an integer, but don't get one, which I would also be open to.
@BethanyG