problem-specifications icon indicating copy to clipboard operation
problem-specifications copied to clipboard

Improve error classification

Open ceddlyburge opened this issue 1 year ago • 3 comments

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

ceddlyburge avatar Mar 03 '23 12:03 ceddlyburge