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

MainLoop should warn when unexpected argument is passed #10

Closed
bedapisl opened this issue Oct 1, 2018 · 0 comments
Closed

MainLoop should warn when unexpected argument is passed #10

bedapisl opened this issue Oct 1, 2018 · 0 comments
Assignees

Comments

@bedapisl
Copy link
Contributor

bedapisl commented Oct 1, 2018

Migrated from https://github.com/Cognexa/cxflow/issues/206

If somebody passes an unexpected argument to mainloop via the config yaml, cxflow raises an exception stating that the mainloop got an unexpected argument. This can easily happen when copy-pasting some config and ruining some indentations...

This is totally fine, but it's also a bit confusing since the stack trace leads the user through the cli about which the user has no idea (I don't expect regular users to understand mainloop or cli in any depth).

I suggest letting the mainloop accept **kwargs and immediately checking that they're empty. The raised exception should state that configuration file is likely incorrect.

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