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

Better Error Messages for Text Format Parsing #27

Open
reventlov opened this issue Feb 15, 2022 · 1 comment
Open

Better Error Messages for Text Format Parsing #27

reventlov opened this issue Feb 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@reventlov
Copy link
Collaborator

UpdateFromText() just returns a bool indicating success/failure. There is currently no way to find out where parsing failed, which makes it difficult to debug manually-written text format structs.

@reventlov reventlov added the enhancement New feature or request label Feb 15, 2022
@reventlov
Copy link
Collaborator Author

The implementation of this is probably to update the C++ UpdateFromTextStream() methods to take an optional output parameter, or to build a parallel API like UpdateFromTextStreamOrReturnError(). I haven't given a lot of thought to the best way to actually return the error(s). Right now, the update bails out if there is any error, but I can imagine having an allow_partial_update option similar to the allow_partial_output option for text output, so ideally the API would allow multiple errors to be returned.

A (maybe) comprehensive list of the places that are are likely to need to be changed:

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