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

Add information about which required field was missing #1765

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gregor-i
Copy link

Exceptions caused by missing required fields don't mention which fields were missing, even though this information is easy to provide

@thesamet
Copy link
Contributor

Can you add unit tests? They can be based on e2e/src/main/protobuf/google/protobuf/unittest.proto and use TestRequired, TestRequiredForeign, and TestRequiredOneof, it should exercise the cases were one or more than one fields are missing.

@gregor-i
Copy link
Author

I've added some test cases. I didn't know how to construct incomplete messages, so my test data setup may be overcomplicated.

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