wherr 0.1.4

Enhance Rust errors with file and line details using the `#[wherr]` macro for clearer debugging.
Documentation
1
2
3
4
5
6
7
8
9
10
11
fn add(s1: &str, s2: &str) -> Result<i64, Box<dyn std::error::Error>> {
    let radix = 10;
    let i1 = i64::from_str_radix(s1, radix)?;
    let i2 = i64::from_str_radix(s2, radix)?;
    Ok(i1 + i2)
}

fn main() {
    let x = add("123", "not a number");
    println!("x = {:?}", x);
}