localtrace 0.2.0

A local tracing library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: MPL-2.0

use super::Result;

pub fn catch_with_trace<F>(f: F)
where
    F: FnOnce() -> Result<()>,
{
    if let Err(e) = f() {
        eprintln!("{e}");
    }
}