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

Gcontract indicating that variable was not found #48

Closed
felixholub opened this issue Nov 16, 2018 · 2 comments
Closed

Gcontract indicating that variable was not found #48

felixholub opened this issue Nov 16, 2018 · 2 comments

Comments

@felixholub
Copy link

What would you like gtools to add or change (and why)?
When using -gcontract- with a variable which is not defined, the error is uninformative:

. sysuse auto, clear
(1978 Automobile Data)

. gcontract color
Malformed call: 'color'
Syntax: [+|-]varname [[+|-]varname ...]
r(111);

A specific message would be more useful.

Please include a specific suggestion
Return Stata's typical variable color not found

mcaceresb added a commit that referenced this issue Nov 16, 2018
Enhancements

- Fixes #48
- Improved by variable parsing in general.
- Error message when variable not found now explicit.
- If `-` is found, warn the user that the default is to interpret
  that as negative, not as part of a varlist.
- `ds` and `nods` control parsing options for `-`
@mcaceresb
Copy link
Owner

Up in develop.

. qui gtools, upgrade branch(develop)

. sysuse auto, clear
(1978 Automobile Data)

. gcontract color
Variable color not found
r(111);

. gcontract color foreign tires
Variables not found: color tires
r(111);

@felixholub
Copy link
Author

Awesone!

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

No branches or pull requests

2 participants