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

Better errors on unknown possible-keywords #156

Merged
merged 1 commit into from
Apr 14, 2015
Merged

Better errors on unknown possible-keywords #156

merged 1 commit into from
Apr 14, 2015

Conversation

kbara
Copy link
Contributor

@kbara kbara commented Apr 14, 2015

As raised in #153
This change introduces a clearer and much more verbose error message on
similar invalid pflang input.

[[%s is not a recognized keyword. Likely causes:
a) %s is a typo, invalid keyword, or similar error.
b) An attempt to use keyword elision.
Repeating the previous keyword is not implemented.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Consider rewording to remove the phrase "keyword elision"; it's not something the user is going to understand. i.e. "Probably this is a typo that you should fix. It could be, though, that you are using a shorthand form of pflang in which, for example, 'host a or b' means 'host a or host b'. Pflua doesn't support this shorthand syntax yet; instead, write out the full form, without omitting keywords."

dunno, that was a pretty bad attempt and I'm sure that anything you come up with will be better :)

As raised in #153
This change introduces a clearer and much more verbose error message on
similar invalid pflang input.
@kbara
Copy link
Contributor Author

kbara commented Apr 14, 2015

I've reworded it taking that further into account, though I'm not entirely convinced my second attempt is much better than my first one.

kbara added a commit that referenced this pull request Apr 14, 2015
Better errors on unknown possible-keywords
@kbara kbara merged commit a128585 into master Apr 14, 2015
@kbara kbara deleted the elidebetter branch July 6, 2015 17:57
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.

2 participants