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

Improve TextFormatDecodingError #580

Closed
thomasvl opened this issue Jun 2, 2017 · 1 comment
Closed

Improve TextFormatDecodingError #580

thomasvl opened this issue Jun 2, 2017 · 1 comment
Labels
kind/enhancement Improvements to existing feature.

Comments

@thomasvl
Copy link
Collaborator

thomasvl commented Jun 2, 2017

TextFormat shouldn't get a ton of use in end user code, but it is very useful in write test cases, configurations, etc. So having better error for when the input is invalid can be pretty useful. Our current values have no context, but for some of them there are likely some pretty easy additions/wins:

  • .unrecognizedEnumValue getting the enum's full name and the string value
  • .conflictingOneOf getting the full message name, the already set field, and the field trying to be set.

Also a good number of the errors could actually also use line number (or atleast offset) into the string buffer being parsed to help someone correct their input.

@thomasvl thomasvl added kind/enhancement Improvements to existing feature. help wanted labels Jun 2, 2017
@thomasvl thomasvl changed the title Improve TextFormatDecodingError Improve TextFormatDecodingError Jun 2, 2017
@thomasvl
Copy link
Collaborator Author

thomasvl commented Jul 9, 2024

main has gotten the infrastructure for a new error model that won't be api breaking, so new errors can have more details. However moving existing errors to that new model was counted as api breaking. So I'm closing this off as we won't actually evolve TextFormatDecodingError , but at some future point with 2.0 work, the existing errors could be given more context like this.

@thomasvl thomasvl closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant