This PR changes valuable-serde's recording of dyn Error values to
record the error as a serde struct with message and source fields.
This way, we can serialize errors with source chains more nicely.
When the backtrace support for std::error::Error is stable, we could
also record backtraces as a field. We could even consider adding a build
script to detect the nightly compiler and conditionally enable a cfg
for backtrace support, but that seems better left to a follow-up.
This PR changes
valuable-serde
's recording ofdyn Error
values to record the error as aserde
struct withmessage
andsource
fields. This way, we can serialize errors with source chains more nicely.When the backtrace support for
std::error::Error
is stable, we could also record backtraces as a field. We could even consider adding a build script to detect the nightly compiler and conditionally enable acfg
for backtrace support, but that seems better left to a follow-up.