Skip to content

Conversation

@gadenbuie
Copy link
Member

Adds a "parse_error" class to the error thrown when trying to parse the user's submitted code. This makes it possible for the error checker — which now gets first dibs on the parse error before the default parse error feedback is returned — to differentiate between parse errors and other errors.

# in "base" learnr error checking code
inherits(last_value, "parse_error")

# in gradethis error checking code
inherits(.result, "parse_error")

Copy link
Contributor

@rossellhayes rossellhayes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

gadenbuie added a commit that referenced this pull request Feb 11, 2022
@gadenbuie gadenbuie merged commit ed4e212 into main Feb 15, 2022
@gadenbuie gadenbuie deleted the parse_error branch February 15, 2022 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants