-
Notifications
You must be signed in to change notification settings - Fork 123
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
Centralise error positioning + cover custom de errors #356
Conversation
7d411bc
to
1889d64
Compare
There is also the question whether |
c9fe4b8
to
6ce56de
Compare
?r @torkleyy Any thoughts? |
6ce56de
to
f8c2b51
Compare
I'm very sorry that neither me or torkley are responsive! |
ed3253a
to
648fc5e
Compare
Fixes #203 and supersedes #209. Also includes some small minor refactoring of the
ErrorCode
names.In particular, the
Deserializer
now usesErrorCode
as 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_str
etc. 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