Registry / logging / color-eyre

color-eyre

JSON →
library0.6.5rscratesunverified

An error report handler for panics and eyre::Reports for colorful, consistent, and well formatted error reports for all kinds of errors.

# Cargo.toml [dependencies] color-eyre = "0.6.5"
INSTALL
IMPORT
SIG · COLOR-EYRE
C
color-eyre
loggingrustv0.6.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Report
use color_eyre::eyre::Report;

Installs color-eyre as the global error handler and uses eyre::Result.

use color_eyre::eyre::Result; fn main() -> Result<()> { color_eyre::install()?; let x: u32 = "not a number".parse()?; Ok(()) }
Debug
Known issues
gotchaRequires `color-eyre` to be installed before any error occurs; otherwise, default panic handler is used.
fix
Call `color_eyre::install()` at the start of `main`.
affects: >=0.6.0
Upgrade
Version history
0.6.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
36
OpenAI (training)
1
Resources
color-eyre — cargo add color-eyre · libregistry