Closed stormshield-kg closed 1 month ago
This allows us to keep previously captured backtrace and spantrace and store them inside a new color_eyre::Handler.
color_eyre::Handler
Usage example when using a custom enum error but keeping the capture of the backtrace and spantrace :
This allows us to keep previously captured backtrace and spantrace and store them inside a new
color_eyre::Handler
.Usage example when using a custom enum error but keeping the capture of the backtrace and spantrace :
Code
```rust use std::panic::Location; use backtrace::Backtrace; use color_eyre::{eyre, Handler, Report}; use thiserror::Error; use tracing_error::SpanTrace; #[derive(Debug)] pub struct ErrorImpl { /// Original error pub inner: Report, /// Deepest location pub location: &'static Location<'static>, /// Deepest backtrace pub backtrace: Option