Skip to content

tor-error: use `Display` for backtrace captured by `BugRepr`

opara requested to merge opara/arti:backtrace-display into main

Closes #1713 (closed).

Before:

2024-10-29T01:57:31Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
Backtrace [{ fn: "tor_error::internal::ie_backtrace::capture", file: "./crates/tor-error/src/internal.rs", line: 21 }, { fn: "tor_error::internal::Bug::new_inner", file: "./crates/tor-error/src/internal.rs", line: 105 }, { fn: "tor_error::internal::Bug::new", file: "./crates/tor-error/src/internal.rs", line: 94 }, { fn: "arti::main_main", file: "./crates/arti/src/lib.rs", line: 378 }, ...

After:

2024-10-29T01:58:23Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
   0: tor_error::internal::ie_backtrace::capture
             at ./crates/tor-error/src/internal.rs:21:27
   1: tor_error::internal::Bug::new_inner
             at ./crates/tor-error/src/internal.rs:105:24
   2: tor_error::internal::Bug::new
             at ./crates/tor-error/src/internal.rs:94:9
   3: arti::main_main
             at ./crates/arti/src/lib.rs:378:27
   ...

Merge request reports

Loading