localtrace 0.2.0

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

pub fn catch_with_trace<F>(f: F)
where
    F: FnOnce() -> super::Result<()>,
{
    let res = f();
    assert!(
        res.is_ok(),
        "Function failed with error:\n {}",
        res.unwrap_err()
    );
}