We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, it is annoying to track error.position in every function returning der::Error.
error.position
der::Error
From another issue:
Attempting to even construct der::Error was confusing [...] It is also unclear to me whether the position that this method uses will be correct [...]
der::Decode
formats/der/src/error.rs
Lines 23 to 24 in 9813667
Actually, most functions don't return the position - example:
formats/der/src/datetime.rs
Lines 79 to 83 in 9813667
What I suggest is something like serde + quick-xml:
let mut reader = SliceReader::new(EXAMPLE_MSG).unwrap(); let err = SomeStruct::decode(&mut reader); assert!(err.is_err()); assert_eq!(reader.error_position(), 28);
https://docs.rs/quick-xml/latest/quick_xml/de/struct.Deserializer.html#method.get_ref
tafia/quick-xml#743
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, it is annoying to track
error.position
in every function returningder::Error
.From another issue:
der::Decode
trait impl error handling #1492formats/der/src/error.rs
Lines 23 to 24 in 9813667
Actually, most functions don't return the position - example:
formats/der/src/datetime.rs
Lines 79 to 83 in 9813667
What I suggest is something like serde + quick-xml:
https://docs.rs/quick-xml/latest/quick_xml/de/struct.Deserializer.html#method.get_ref
tafia/quick-xml#743
The text was updated successfully, but these errors were encountered: