Centralise error positioning + cover custom de errors#356
Merged
Conversation
7d411bc to
1889d64
Compare
Member
Author
Member
Author
|
There is also the question whether |
c9fe4b8 to
6ce56de
Compare
Member
Author
|
?r @torkleyy Any thoughts? |
6ce56de to
f8c2b51
Compare
Collaborator
|
I'm very sorry that neither me or torkley are responsive! |
kvark
approved these changes
Feb 18, 2022
ed3253a to
648fc5e
Compare
kvark
approved these changes
Feb 19, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #203 and supersedes #209. Also includes some small minor refactoring of the
ErrorCodenames.In particular, the
Deserializernow usesErrorCodeas its error type, no longer having to pretend to produce error positions in all cases (which as #209 showed were missing in all serde-internal and user-generated cases, and can only be added during deserialization to the former). Instead, the exposed helper functionsfrom_stretc. now add the positional information afterwards, which cleans up the code and gives us positions for custom errors in serde-code and user-code for free (though the position still only points at the character after the error or directly at it).CHANGELOG.md