#error #location #information #bool #panic #stringly-typed #track-caller

tracked

A stringly-typed Error that includes #[track_caller] information

11 releases

0.5.4 Apr 8, 2023
0.5.3 Oct 30, 2022
0.5.2 Jun 4, 2022
0.2.0 Mar 29, 2022

#3 in #bool

Download history 37/week @ 2024-04-04 55/week @ 2024-04-11 31/week @ 2024-04-18 37/week @ 2024-04-25 34/week @ 2024-05-02 62/week @ 2024-05-09 33/week @ 2024-05-16 35/week @ 2024-05-23 132/week @ 2024-05-30 86/week @ 2024-06-06 80/week @ 2024-06-13 75/week @ 2024-06-20 66/week @ 2024-06-27 64/week @ 2024-07-04 54/week @ 2024-07-11 79/week @ 2024-07-18

275 downloads per month
Used in turbocharger

MIT OR Apache-2.0 OR CC0-1.0

7KB
132 lines

tracked

github crates.io docs.rs

A stringly-typed Error that includes #[track_caller] information.

Points you to the location in your code that errored, without the panic!.

Also lets you try an Option or a bool into a Result.

use tracked::tracked;

fn f() -> Option<()> {
    None
}

#[tracked]
fn main() -> Result<(), tracked::StringError> {
    true?;
    f()?;
    Ok(())
}
Error: NoneError in main at src/main.rs:10:8

Dependencies

~0.4–1MB
~23K SLoC