oopsie
Ergonomic, structured error handling for Rust — typed context selectors, automatic backtrace/span-trace capture, and rich colorized reports.
Pre-release: not yet published to crates.io. Public API changes freely.
Quick start
use *;
#[oopsie] generates context selectors, Display, Debug, and Error impls.
traced adds backtrace + span-trace capture and an automatic error code.
Report renders errors (and panics, via its panic hook) as colorized reports.
Crates
| Crate | What it is |
|---|---|
oopsie |
The facade: #[oopsie] macro, Report, panic hook, prelude. Start here. |
oopsie-core |
Core types: Backtrace, SpanTrace, Diagnostic, Welp. |
oopsie-macros |
Proc macros: #[oopsie] attribute and Oopsie derive. |
Features
| Feature | Default | Toolchain | Effect |
|---|---|---|---|
fancy |
yes | stable | Report, color output, panic hook |
tracing |
no | stable | span-trace capture and the tracing-subscriber error layer |
serde |
no | stable | the erased module: serialize any error as a type-erased value |
chrono |
no | stable | chrono::DateTime<Local> timestamps for traced(timestamp(chrono = true)); no direct chrono dependency required |
jiff |
no | stable | jiff::Timestamp / jiff::Zoned timestamp capture |
extras |
no | stable | the extras module: environment-snapshot Capturable helpers |
unstable |
no | nightly | umbrella for the two features below |
unstable-error-generic-member-access |
no | nightly | trace/diagnostic surfacing through the Provider API |
unstable-try-trait-v2 |
no | nightly | ? converts directly into Report |
MSRV: 1.89. Development uses the nightly pinned in rust-toolchain.toml.
Development
Snapshot tests are only valid for the two blessed combos — stable + default
features and nightly + --features unstable. Other feature combinations
compare against the wrong snapshots.
License
Licensed under either of MIT or Apache-2.0 at your option.