Stream: project-error-handling

Topic: (De)serialization of dyn Error


view this post on Zulip Jason Smith (Sep 20 2020 at 22:25):

For a Spark-like application (or really any distributed application), how would you handle ser/deser of dyn Error? Is this a fundamental limitation of Rust error handling?

view this post on Zulip Jane Lusby (Sep 20 2020 at 22:45):

it's not really fundamental but right now the error trait only exposes a small amount of context about the underlying error types

view this post on Zulip Jane Lusby (Sep 20 2020 at 22:46):

so you can put msgs and debug fmts and source errors in it but you lose the type info

view this post on Zulip Jane Lusby (Sep 20 2020 at 22:46):

I think you might be able to grab a type id

view this post on Zulip Jane Lusby (Sep 20 2020 at 22:46):

this seems unrelated to api stability tho so maybe we need to split this into a new thread

view this post on Zulip Jake Goulding (Sep 20 2020 at 23:54):

@Jason Smith How to implement serde::Serialize for a boxed trait object? and How do I deserialize into trait, not a concrete type?

view this post on Zulip Jane Lusby (Sep 21 2020 at 00:11):

I should really revive my errtools crate where I implemented serialization and deserialization for dyn errors already

view this post on Zulip Jane Lusby (Sep 21 2020 at 00:11):

and an ill advised version of SNAFUs context fn that is stand alone


Last updated: Jan 26 2022 at 14:20 UTC