Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message on unsupported command #538

Closed
gagern opened this issue Sep 20, 2016 · 0 comments · Fixed by #1723
Closed

Improve error message on unsupported command #538

gagern opened this issue Sep 20, 2016 · 0 comments · Fixed by #1723
Assignees
Milestone

Comments

@gagern
Copy link
Collaborator

gagern commented Sep 20, 2016

This is a spin-off from #526 (comment).

If input contains some unsupported command nested in some group or environment, the parser will complain about the fact that the group resp. environment isn't ended with one of the expected symbols. The most likely scenario, however, is that the user didn't really mean to end the environment, but did expect the function in question to exist. So it would be better to report that appropriately.

Source locations: if this check finds no matching function, null will get returned which propagates up the tree and out of the parseExpression invocation where it triggers the observed error message. The !throwOnError handling might be the right place to generate a more useful error message, too. Doing so may make behavior with or without throwOnError more consistent as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants