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

Contextualize redefinition errors #668

Open
pelletier opened this issue Nov 10, 2021 · 0 comments
Open

Contextualize redefinition errors #668

pelletier opened this issue Nov 10, 2021 · 0 comments
Labels
feature Issue asking for a new feature in go-toml.

Comments

@pelletier
Copy link
Owner

Follow up to #667. When SeenTracker finds a duplicate in the document structure it returns a simple error with no context. For example:

toml: key b is already defined

We should also provide more context about where the error occurred in the document, maybe the current path to the key at fault, possibly the source of the error (like where was the original key that just got redefined), similar to DecodeError (maybe should just reuse it?).

@pelletier pelletier added feature Issue asking for a new feature in go-toml. v2 Issues impacting the v2 major version. labels Nov 10, 2021
@pelletier pelletier added this to the v2.0.0-beta.6 milestone Nov 10, 2021
@pelletier pelletier removed this from the v2.0.0-beta.6 milestone Dec 2, 2021
@pelletier pelletier removed the v2 Issues impacting the v2 major version. label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue asking for a new feature in go-toml.
Projects
None yet
Development

No branches or pull requests

1 participant