I was trying to use the error_msg argument for expect_expr (looks like I am the first one) and the assumption that eval_result.IsValid() is false does not look correct, so I removed it.
I also changed the way we check of the error messages matches from an exact match to just looking for the string withing the error message. Matching the whole error message does not feel necessary.