3 ms·
The simplest thing that "just work" for me is replacing ? with .context(h!())? and this macro: #[macro_export] macro_rules! h { () => { concat!(
by k_bx 2y ago
The simplest thing that "just work" for me is replacing ? with .context(h!())? and this macro:
#[macro_export]
macro_rules! h {
() => {
concat!("at ", file!(), " line ", line!(), " column ", column!())
};
and then using anyhow::Result.
Solves 99% problems in error handling