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

Replace Model.check() with Model.errors() #65

Closed
goodmami opened this issue Feb 2, 2020 · 0 comments
Closed

Replace Model.check() with Model.errors() #65

goodmami opened this issue Feb 2, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@goodmami
Copy link
Owner

goodmami commented Feb 2, 2020

The individual errors logged by Model.check() are not really inspectable except by a human reading stderr. Instead, the function could be replaced with something like Model.errors() which returns a data structure containing those error messages.

The data structure could be serialized as metadata when --check is used, thus removing the need to deal with synchronously flushing stdout and stderr (see #60).

The function's name change is so something like if model.errors(): ... executes the body of the if statement if there ARE errors, whereas with if model.check(): ... the intuition is that the body executes if there are no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant