Handle errors in the expression parser