rs-matter
rs-matter copied to clipboard
Provide decent error message for wrapped errors
Add an error: Box<dyn std::error::Error>
member to the Error
enum here. Then include the original error message (and possibly its backtrace, if any) in the Debug
and Display
impl for the matter-rs Error
enum.
Just like the backtrace
member, it should be enabled only when both std
and backtrace
features are enabled, as it would be bringing non-trivial cost to the unhappy path.
Yet very useful for proper diagnostics of errors originating outside of matter-rs
itself.