focustrace

Crates.iofocustrace
lib.rsfocustrace
version0.2.0
sourcesrc
created_at2024-06-09 18:21:15.829483
updated_at2024-06-09 18:28:12.041934
descriptionSmall utility to print a backtrace containing only functions called from the current crate on panic.
homepage
repositoryhttps://github.com/cmarkh/focustrace
max_upload_size
id1266547
size3,141
Mark Hendrickson (cmarkh)

documentation

README

focustrace

Small utility to print a backtrace containing only functions called from the current crate on panic.

It's a simple extension of the backtrace crate.

Usage

fn main() {
  focustrace::setup();
}

Example output on panic

panicked at src/lib.rs:43:9:
Test panic

src/lib.rs:4: focustrace::setup::{{closure}}::haa6742a590bf138b
src/lib.rs:43: focustrace::tests::test_setup::h6f4a089fcd9ad7b4
src/lib.rs:41: focustrace::tests::test_setup::{{closure}}::ha937ffcfc3bdf67a
Commit count: 5

cargo fmt