Expand description
This library provides a custom eyre::EyreHandler type for usage with eyre that provides
all the same features as eyre::DefaultHandler except it works on stable by capturing a
backtrace::Backtrace via backtrace-rs.
§Setup
Add the following to your toml file:
[dependencies]
stable-eyre = "0.2"Then install the hook handler before constructing any eyre::Report types.
§Example
ⓘ
use stable_eyre::eyre::{eyre, Report, WrapErr};
fn main() -> Result<(), Report> {
stable_eyre::install()?;
let e: Report = eyre!("oh no this program is just bad!");
Err(e).wrap_err("usage example successfully experienced a failure")
}Re-exports§
pub use eyre;
Structs§
- Handler
- A custom context type for capturing backtraces on stable with
eyre - Hook
Builder - Builder for customizing the behavior of the global error report hook
Traits§
- Backtrace
Ext - Extension trait to extract a backtrace from an
eyre::Report, assuming stable-eyre’s hook is installed.
Functions§
- install
- Install the default error report hook provided by
stable-eyre