MCPcopy Create free account
hub / github.com/hashintel/hash / backtrace

Function backtrace

libs/error-stack/src/fmt/hook.rs:517–529  ·  view source on GitHub ↗
(backtrace: &Backtrace, context: &mut HookContext<Backtrace>)

Source from the content-addressed store, hash-verified

515
516 #[cfg(feature = "backtrace")]
517 fn backtrace(backtrace: &Backtrace, context: &mut HookContext<Backtrace>) {
518 let idx = context.increment_counter();
519
520 context.push_appendix(format!("backtrace no. {}\n{backtrace}", idx + 1));
521 #[cfg(nightly)]
522 context.push_body(format!(
523 "backtrace with {} frames ({})",
524 backtrace.frames().len(),
525 idx + 1
526 ));
527 #[cfg(not(nightly))]
528 context.push_body(format!("backtrace ({})", idx + 1));
529 }
530
531 #[cfg(feature = "spantrace")]
532 fn span_trace(span_trace: &SpanTrace, context: &mut HookContext<SpanTrace>) {

Callers

nothing calls this directly

Calls 2

push_appendixMethod · 0.80
push_bodyMethod · 0.80

Tested by

no test coverage detected