Expand description
§tracked
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:8Structs§
Traits§
- Track
- Provides the
t(“track”) method forbool,Option, andResult.
Functions§
- set_
build_ id - Optionally call this once at startup to include an identifying string in reported errors.
Attribute Macros§
- tracked
- Apply this to a
fnto track line numbers for?errors.