Crates.io | eoe |
lib.rs | eoe |
version | 0.1.1 |
source | src |
created_at | 2024-07-09 01:46:28.573365 |
updated_at | 2024-07-14 14:37:50.111385 |
description | This crate helps you exit on error with underlying `anyhow` error handling. |
homepage | |
repository | https://github.com/Lingxuan-Ye/eoe |
max_upload_size | |
id | 1296573 |
size | 7,502 |
This crate helps you exit on error with underlying anyhow
error handling.
cargo add eoe
use anyhow::{anyhow, Context};
use eoe::ExitOnError;
Err::<(), _>(anyhow!("Mm-noom-ba-deh"))
.context("Doom-boom-ba-beh")
.context("Doo-boo-boom-ba-beh-beh")
.exit_on_error();
use anyhow::{anyhow, Context};
use eoe::QuitOnError;
Err::<(), _>(anyhow!("Mm-ba-ba-beh, mm-ba-ba-beh"))
.context("Dee-day-da, ee-day-da")
.quit_on_error();