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

Generate errors for invalid parameter value list #42

Open
spine-o-bot opened this issue Feb 7, 2021 · 0 comments
Open

Generate errors for invalid parameter value list #42

spine-o-bot opened this issue Feb 7, 2021 · 0 comments
Assignees

Comments

@spine-o-bot
Copy link

In GitLab by @manuelma on Apr 29, 2020, 18:45

Another issue related to enumerated parameters is that if you specify a value that doesn't exist, it doesn't generate an error. For example :

for c in commodity(commodity_physics=:i_love_julia)

will not generate an error - which is dangerous - it just silently passes as false and will never be true. One of the rationales for enumerated parameters was to guard against this.

Also, this doesn't generate an error either :

for c in commodity(this_parameter_doesnt_exist=:this_symbol_doesnt_exist_either)

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