#panic #result #error #information #none #ok #stringly-typed #true

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
Download history 30/week @ 2023-10-27 6/week @ 2023-11-03 18/week @ 2023-11-10 7/week @ 2023-11-17 29/week @ 2023-11-24 28/week @ 2023-12-01 27/week @ 2023-12-08 16/week @ 2023-12-15 27/week @ 2023-12-22 3/week @ 2023-12-29 5/week @ 2024-01-05 5/week @ 2024-01-12 13/week @ 2024-01-19 15/week @ 2024-01-26 15/week @ 2024-02-02 18/week @ 2024-02-09

61 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.5–1MB
~24K SLoC