mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-27 04:50:50 +00:00
Merge pull request #92 from asonix/asonix/update-tracing-error
Update tracing error (and tracing subscriber)
This commit is contained in:
commit
5624f10c50
12
Cargo.toml
12
Cargo.toml
@ -19,20 +19,20 @@ track-caller = []
|
||||
|
||||
[dependencies]
|
||||
eyre = "0.6.1"
|
||||
tracing-error = { version = "0.1.2", optional = true }
|
||||
tracing-error = { version = "0.2.0", optional = true }
|
||||
backtrace = { version = "0.3.48", features = ["gimli-symbolize"] }
|
||||
indenter = "0.3.0"
|
||||
owo-colors = "1.2.1"
|
||||
color-spantrace = { version = "0.1.6", optional = true }
|
||||
owo-colors = "3.2.0"
|
||||
color-spantrace = { version = "0.2", optional = true }
|
||||
once_cell = "1.4.0"
|
||||
url = { version = "2.1.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.2.5"
|
||||
tracing-subscriber = { version = "0.3.0", features = ["env-filter"] }
|
||||
tracing = "0.1.13"
|
||||
pretty_assertions = "0.6.1"
|
||||
pretty_assertions = "1.0.0"
|
||||
thiserror = "1.0.19"
|
||||
ansi-parser = "0.6.5" # used for testing color schemes
|
||||
ansi-parser = "0.8.0"
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.15"
|
||||
|
@ -26,7 +26,7 @@ fn main() -> Result<(), Report> {
|
||||
.install()
|
||||
.unwrap();
|
||||
|
||||
Ok(read_config()?)
|
||||
read_config()
|
||||
}
|
||||
|
||||
#[cfg(feature = "capture-spantrace")]
|
||||
|
@ -34,7 +34,7 @@ fn main() -> Result<(), Report> {
|
||||
install_tracing();
|
||||
color_eyre::install()?;
|
||||
|
||||
Ok(read_config().map(drop)?)
|
||||
read_config().map(drop)
|
||||
}
|
||||
|
||||
#[cfg(feature = "capture-spantrace")]
|
||||
|
@ -34,7 +34,7 @@ fn main() {
|
||||
let span = tracing::info_span!("get_error", msg);
|
||||
let _guard = span.enter();
|
||||
let error = get_error(msg);
|
||||
panic!(error)
|
||||
std::panic::panic_any(error)
|
||||
}
|
||||
|
||||
fn setup() {
|
||||
|
@ -8,7 +8,7 @@ fn main() -> Result<(), Report> {
|
||||
|
||||
color_eyre::install()?;
|
||||
|
||||
Ok(read_config()?)
|
||||
read_config()
|
||||
}
|
||||
|
||||
#[cfg(feature = "capture-spantrace")]
|
||||
|
@ -257,7 +257,7 @@ impl<'a> fmt::Display for StyledFrame<'a> {
|
||||
|
||||
// Maybe print source.
|
||||
if v >= Verbosity::Full {
|
||||
write!(&mut separated.ready(), "{}", SourceSection(&frame, *theme))?;
|
||||
write!(&mut separated.ready(), "{}", SourceSection(frame, *theme))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@ -859,7 +859,7 @@ fn print_panic_info(report: &PanicReport<'_>, f: &mut fmt::Formatter<'_>) -> fmt
|
||||
}
|
||||
|
||||
if let Some(bt) = report.backtrace.as_ref() {
|
||||
let fmted_bt = report.hook.format_backtrace(&bt);
|
||||
let fmted_bt = report.hook.format_backtrace(bt);
|
||||
write!(
|
||||
indented(&mut separated.ready()).with_format(Format::Uniform { indentation: " " }),
|
||||
"{}",
|
||||
|
@ -112,7 +112,7 @@ impl eyre::EyreHandler for Handler {
|
||||
}
|
||||
|
||||
if let Some(backtrace) = self.backtrace.as_ref() {
|
||||
let fmted_bt = self.format_backtrace(&backtrace);
|
||||
let fmted_bt = self.format_backtrace(backtrace);
|
||||
|
||||
write!(
|
||||
indented(&mut separated.ready()).with_format(Format::Uniform { indentation: " " }),
|
||||
|
@ -338,7 +338,7 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![warn(
|
||||
missing_docs,
|
||||
missing_doc_code_examples,
|
||||
rustdoc::missing_doc_code_examples,
|
||||
rust_2018_idioms,
|
||||
unreachable_pub,
|
||||
bad_style,
|
||||
|
@ -2,49 +2,49 @@
|
||||
0: [91mtest[0m
|
||||
|
||||
Location:
|
||||
[35mtests/theme.rs[0m:[35m1[0m
|
||||
[35mtests/theme.rs[0m:[35m17[0m
|
||||
|
||||
Error:
|
||||
0: [91merror[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
0: [91mtheme[0m[91m::[0m[91mget_error[0m with [96mmsg="test"[0m
|
||||
|
||||
0: [91mtheme[0m[91m::[0m[91mget_error[0m with [96m[3mmsg[0m[2m=[0m"test"[0m
|
||||
at [35mtests/theme.rs[0m:[35m11[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[96m ⋮ 5 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::h982c27931cc8e4b1[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::hae775e99e0b7d1c5[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::hd4b57a8cb5c1870b[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs[0m:[35m558[0m
|
||||
9: [91mtheme::get_error[0m[90m::hfc71373d92f563f0[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m1[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h4bf087e5e689a5d0[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m36[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::hf172868901d86cb0[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m34[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::h9b87751ef643fe90[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::hb2ff33e91aac5799[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::hc8fd71b19bc78390[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m516[0m
|
||||
15: [32m<alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once[0m[90m::hb8ab4b7e0de41b66[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs[0m:[35m1042[0m
|
||||
16: [32m<std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::hc48829c2ba8b55d6[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m308[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::h95feedb4d9e8dd5b[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m381[0m
|
||||
18: [32mstd::panicking::try[0m[90m::hc4c23f5f7d3bdd43[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m345[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::hf3a57d903cc5007a[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m382[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h09c598ed2a1f6695[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m543[0m
|
||||
[96m ⋮ 14 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::hdb41452bef3fc05d[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m17[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::h739c7fe800e2d03f[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::hd8e670bbca63e94a[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs[0m:[35m954[0m
|
||||
9: [91mtheme::get_error[0m[90m::h2f751f4927c6fecb[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::hfc4be9f22c32535c[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m43[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::hb001a9a908f0f5a4[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m41[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::he26938a69d361bf6[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::h83cc023b85256d97[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::h7330e4e8b0549e26[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m585[0m
|
||||
15: [32m<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once[0m[90m::h6b77566b8f386abb[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs[0m:[35m1691[0m
|
||||
16: [32m<core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::h2ad5de64df41b71c[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs[0m:[35m271[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::he67b1e56b423a618[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m403[0m
|
||||
18: [32mstd::panicking::try[0m[90m::ha9224adcdd41a723[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m367[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::h9111b58ae0b27828[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs[0m:[35m133[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h15b6b7d5919893aa[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m608[0m
|
||||
[96m ⋮ 15 frames hidden ⋮ [0m
|
||||
|
||||
[96mNote[0m: note
|
||||
[93mWarning[0m: warning
|
||||
|
@ -2,44 +2,44 @@
|
||||
0: [91mtest[0m
|
||||
|
||||
Location:
|
||||
[35mtests/theme.rs[0m:[35m1[0m
|
||||
[35mtests/theme.rs[0m:[35m17[0m
|
||||
|
||||
Error:
|
||||
0: [91merror[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[96m ⋮ 5 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::hecce092abf39d046[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::h72d386b2dea32911[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::h21963800b101550e[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs[0m:[35m558[0m
|
||||
9: [91mtheme::get_error[0m[90m::hd9136d29f5ab726a[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m1[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h34861d848c30c15b[0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::hf800a973f2100b44[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m17[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::ha65156cf9648d3e0[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::h08df66cff4c7bff2[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs[0m:[35m954[0m
|
||||
9: [91mtheme::get_error[0m[90m::h7c1fce8fa3550ff9[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h732311d7da5d7160[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m43[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::h807eb4bfe3d5b701[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::h144cea82038adfc7[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m41[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::h367eeeae05a22ee2[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::hb2ff33e91aac5799[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::hc8fd71b19bc78390[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m516[0m
|
||||
15: [32m<alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once[0m[90m::hb8ab4b7e0de41b66[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs[0m:[35m1042[0m
|
||||
16: [32m<std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::hc48829c2ba8b55d6[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m308[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::h95feedb4d9e8dd5b[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m381[0m
|
||||
18: [32mstd::panicking::try[0m[90m::hc4c23f5f7d3bdd43[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m345[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::hf3a57d903cc5007a[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m382[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h09c598ed2a1f6695[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m543[0m
|
||||
[96m ⋮ 14 frames hidden ⋮ [0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::h8d0ee3b0b70ed418[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::h83cc023b85256d97[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::h7330e4e8b0549e26[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m585[0m
|
||||
15: [32m<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once[0m[90m::h6b77566b8f386abb[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs[0m:[35m1691[0m
|
||||
16: [32m<core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::h2ad5de64df41b71c[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs[0m:[35m271[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::he67b1e56b423a618[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m403[0m
|
||||
18: [32mstd::panicking::try[0m[90m::ha9224adcdd41a723[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m367[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::h9111b58ae0b27828[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs[0m:[35m133[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h15b6b7d5919893aa[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m608[0m
|
||||
[96m ⋮ 15 frames hidden ⋮ [0m
|
||||
|
||||
[96mNote[0m: note
|
||||
[93mWarning[0m: warning
|
||||
|
@ -6,37 +6,37 @@ Error:
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[96m ⋮ 5 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::h0e145b5457fc8cad[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::hb27e60e10fce9219[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::h20663e177c22f833[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs[0m:[35m558[0m
|
||||
9: [91mtheme::get_error[0m[90m::h9c9e66e0ceed2b65[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m1[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h9e815269077c9440[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m73[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::h046022f112557a9a[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m71[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::hc5e0c046d81e0b54[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::hb2ff33e91aac5799[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::hc8fd71b19bc78390[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m516[0m
|
||||
15: [32m<alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once[0m[90m::hb8ab4b7e0de41b66[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs[0m:[35m1042[0m
|
||||
16: [32m<std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::hc48829c2ba8b55d6[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m308[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::h95feedb4d9e8dd5b[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m381[0m
|
||||
18: [32mstd::panicking::try[0m[90m::hc4c23f5f7d3bdd43[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m345[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::hf3a57d903cc5007a[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m382[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h09c598ed2a1f6695[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m543[0m
|
||||
[96m ⋮ 14 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::h89d883b51d51a08b[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m17[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::hb62079fda66513a2[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::h3227505b8a14ed22[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs[0m:[35m954[0m
|
||||
9: [91mtheme::get_error[0m[90m::hd930d722dbdb6279[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h920cc312bf19dc01[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m43[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::h0c00291bcfdb63ce[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m41[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::h7736c3dcb6fd829d[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::h83cc023b85256d97[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::h7330e4e8b0549e26[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m585[0m
|
||||
15: [32m<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once[0m[90m::h6b77566b8f386abb[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs[0m:[35m1691[0m
|
||||
16: [32m<core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::h2ad5de64df41b71c[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs[0m:[35m271[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::he67b1e56b423a618[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m403[0m
|
||||
18: [32mstd::panicking::try[0m[90m::ha9224adcdd41a723[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m367[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::h9111b58ae0b27828[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs[0m:[35m133[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h15b6b7d5919893aa[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m608[0m
|
||||
[96m ⋮ 15 frames hidden ⋮ [0m
|
||||
|
||||
[96mNote[0m: note
|
||||
[93mWarning[0m: warning
|
||||
|
@ -5,43 +5,43 @@ Error:
|
||||
0: [91merror[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
0: [91mtheme[0m[91m::[0m[91mget_error[0m with [96mmsg="test"[0m
|
||||
|
||||
0: [91mtheme[0m[91m::[0m[91mget_error[0m with [96m[3mmsg[0m[2m=[0m"test"[0m
|
||||
at [35mtests/theme.rs[0m:[35m11[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[96m ⋮ 5 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::hbcd472d1eeaf19a1[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::h45c5fb3ac686eba0[0m
|
||||
at [35m<unknown source file>[0m:[35m<unknown line>[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::h0e862254360788fc[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs[0m:[35m558[0m
|
||||
9: [91mtheme::get_error[0m[90m::haec25813a54aac8c[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m1[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h45e601b75f8f5192[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m73[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::h872ad148b26640d2[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m71[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::h4773fdcbabed93bc[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::hb2ff33e91aac5799[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::hc8fd71b19bc78390[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m516[0m
|
||||
15: [32m<alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once[0m[90m::hb8ab4b7e0de41b66[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs[0m:[35m1042[0m
|
||||
16: [32m<std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::hc48829c2ba8b55d6[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m308[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::h95feedb4d9e8dd5b[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m381[0m
|
||||
18: [32mstd::panicking::try[0m[90m::hc4c23f5f7d3bdd43[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs[0m:[35m345[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::hf3a57d903cc5007a[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs[0m:[35m382[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h09c598ed2a1f6695[0m
|
||||
at [35m/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/test/src/lib.rs[0m:[35m543[0m
|
||||
[96m ⋮ 14 frames hidden ⋮ [0m
|
||||
6: [91mtheme::get_error::create_report[0m[90m::h4bc625c000e4636e[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m17[0m
|
||||
7: [91mtheme::get_error::{{closure}}[0m[90m::h3dee499015f52230[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
8: [32mcore::option::Option<T>::ok_or_else[0m[90m::h32a80642d5f9cd65[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs[0m:[35m954[0m
|
||||
9: [91mtheme::get_error[0m[90m::hb3756d9f0d65527f[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m25[0m
|
||||
10: [91mtheme::test_error_backwards_compatibility[0m[90m::h69192dd92f3a8a2e[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m43[0m
|
||||
11: [91mtheme::test_error_backwards_compatibility::{{closure}}[0m[90m::hd9459c2e516ade18[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/tests/theme.rs[0m:[35m41[0m
|
||||
12: [32mcore::ops::function::FnOnce::call_once[0m[90m::h540507413fe72275[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
13: [32mcore::ops::function::FnOnce::call_once[0m[90m::h83cc023b85256d97[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
14: [32mtest::__rust_begin_short_backtrace[0m[90m::h7330e4e8b0549e26[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m585[0m
|
||||
15: [32m<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once[0m[90m::h6b77566b8f386abb[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs[0m:[35m1691[0m
|
||||
16: [32m<core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once[0m[90m::h2ad5de64df41b71c[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs[0m:[35m271[0m
|
||||
17: [32mstd::panicking::try::do_call[0m[90m::he67b1e56b423a618[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m403[0m
|
||||
18: [32mstd::panicking::try[0m[90m::ha9224adcdd41a723[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs[0m:[35m367[0m
|
||||
19: [32mstd::panic::catch_unwind[0m[90m::h9111b58ae0b27828[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs[0m:[35m133[0m
|
||||
20: [32mtest::run_test_in_process[0m[90m::h15b6b7d5919893aa[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs[0m:[35m608[0m
|
||||
[96m ⋮ 15 frames hidden ⋮ [0m
|
||||
|
||||
[96mNote[0m: note
|
||||
[93mWarning[0m: warning
|
||||
|
@ -5,17 +5,19 @@ Message: [36m<non string panic payload>[0m
|
||||
Location: [35mexamples/theme_test_helper.rs[0m:[35m37[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
0: [91mtheme_test_helper[0m[91m::[0m[91mget_error[0m with [96mmsg="test"[0m
|
||||
|
||||
0: [91mtheme_test_helper[0m[91m::[0m[91mget_error[0m with [96m[3mmsg[0m[2m=[0m"test"[0m
|
||||
at [35mexamples/theme_test_helper.rs[0m:[35m34[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[96m ⋮ 6 frames hidden ⋮ [0m
|
||||
7: [91mtheme_test_helper::main[0m[90m::h0f7f307e00efc098[0m
|
||||
7: [32mstd::panic::panic_any[0m[90m::hd76a7f826307234c[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs[0m:[35m57[0m
|
||||
8: [91mtheme_test_helper::main[0m[90m::h767d3fd6c45048c8[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/examples/theme_test_helper.rs[0m:[35m37[0m
|
||||
8: [32mcore::ops::function::FnOnce::call_once[0m[90m::hc90fd75bf8c9f979[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
[96m ⋮ 11 frames hidden ⋮ [0m
|
||||
9: [32mcore::ops::function::FnOnce::call_once[0m[90m::hc5a1cd4127189dad[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
[96m ⋮ 15 frames hidden ⋮ [0m
|
||||
|
||||
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
|
||||
Run with RUST_BACKTRACE=full to include source snippets.
|
||||
|
@ -1,4 +1,4 @@
|
||||
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
|
||||
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
|
||||
Running `target/debug/examples/theme_test_helper`
|
||||
[31mThe application panicked (crashed).[0m
|
||||
Message: [36m<non string panic payload>[0m
|
||||
@ -6,11 +6,13 @@ Location: [35mexamples/theme_test_helper.rs[0m:[35m37[0m
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[96m ⋮ 6 frames hidden ⋮ [0m
|
||||
7: [91mtheme_test_helper::main[0m[90m::hf2cd59a3917c7d01[0m
|
||||
7: [32mstd::panic::panic_any[0m[90m::hb5351c0843c6c4aa[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs[0m:[35m57[0m
|
||||
8: [91mtheme_test_helper::main[0m[90m::h22b568e997946766[0m
|
||||
at [35m/home/jlusby/git/yaahc/color-eyre/examples/theme_test_helper.rs[0m:[35m37[0m
|
||||
8: [32mcore::ops::function::FnOnce::call_once[0m[90m::h1469d0953292aa83[0m
|
||||
at [35m/home/jlusby/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
[96m ⋮ 11 frames hidden ⋮ [0m
|
||||
9: [32mcore::ops::function::FnOnce::call_once[0m[90m::hab7662216a7cf3dc[0m
|
||||
at [35m/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs[0m:[35m227[0m
|
||||
[96m ⋮ 15 frames hidden ⋮ [0m
|
||||
|
||||
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
|
||||
Run with RUST_BACKTRACE=full to include source snippets.
|
||||
|
@ -100,6 +100,7 @@ static PANIC_FILE_NAME: &str = "theme_panic_control.txt";
|
||||
// The following tests the installed panic handler
|
||||
#[test]
|
||||
#[allow(unused_mut)]
|
||||
#[allow(clippy::vec_init_then_push)]
|
||||
fn test_panic_backwards_compatibility() {
|
||||
let mut features: Vec<&str> = vec![];
|
||||
#[cfg(feature = "capture-spantrace")]
|
||||
@ -160,7 +161,7 @@ fn test_backwards_compatibility(target: String, file_name: &str) {
|
||||
})
|
||||
.collect();
|
||||
(all, ansi)
|
||||
};
|
||||
}
|
||||
|
||||
let (_control_tokens, control_ansi) = f(&control);
|
||||
let (_target_tokens, target_ansi) = f(&target);
|
||||
|
Loading…
x
Reference in New Issue
Block a user