librasn / rasn

A Safe #[no_std] ASN.1 Codec Framework
Other
212 stars 51 forks source link

Prettyprint for Errors #198

Open Nicceboy opened 1 year ago

Nicceboy commented 1 year ago

We might need to format the overall errors. Should we just convert it pretty-printed json (once jer is merged), or make custom formatter? It is a bit better now after the field_error change, but maybe it could be made cleaner.

Here is a decode error for around 7 nested structures...

Might need to think about that backtrace, if we could only show the deepest one.

Expand error ```console thread 'tests::test_bsm_with_cert' panicked at ieee1609dot2/src/lib.rs:767:9: called `Result::unwrap()` on an `Err` value: DecodeError { kind: FieldError { name: "Ieee1609Dot2Data.content", nested: DecodeError { kind: FieldError { name: "SignedData.signer", nested: DecodeError { kind: FieldError { name: "CertificateBase.to_be_signed", nested: DecodeError { kind: FieldError { name: "ToBeSignedCertificate.validity_period", nested: DecodeError { kind: FieldError { name: "ValidityPeriod.duration", nested: DecodeError { kind: CodecSpecific { inner: Oer(InvalidTagVariantOnChoice { value: Tag { class: Application, value: 23 }, is_extensible: false }) }, codec: Oer, backtrace: Backtrace( 0: backtrace::backtrace::libunwind::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5 1: backtrace::backtrace::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14 2: backtrace::capture::Backtrace::create at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9 3: backtrace::capture::Backtrace::new at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22 4: ::generate at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snafu-0.7.5/src/backtrace_shim.rs:15:19 rasn::error::decode::DecodeError::from_codec_kind at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:326:24 5: >::from at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:44:9 6: >::into at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/convert/mod.rs:716:9 7: rasn::error::decode::OerDecodeErrorKind::invalid_tag_variant_on_choice at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:630:9 8: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:801:24 9: ::decode at src/base_types.rs:94:26 10: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 11: ::decode_with_tag_and_constraints at src/base_types.rs:94:26 12: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 13: ::decode_with_tag_and_constraints::{{closure}} at src/base_types.rs:87:26 14: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 15: ::decode_with_tag_and_constraints at src/base_types.rs:87:26 16: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 17: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:512:34 18: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 19: ::decode_with_tag_and_constraints at src/lib.rs:512:34 20: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 21: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:347:34 22: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 23: ::decode_with_tag_and_constraints at src/lib.rs:347:34 24: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 25: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 26: ::decode_with_tag_and_constraints at src/lib.rs:425:25 27: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 28: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 29: ::decode_sequence_of at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:543:25 30: as rasn::de::Decode>::decode_with_tag_and_constraints at /Users/nicce/projects/vpki/rasn/src/de.rs:518:9 31: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 32: ::from_tag at src/lib.rs:231:26 33: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 34: ::decode at src/lib.rs:231:26 35: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 36: ::decode_with_tag_and_constraints at src/lib.rs:231:26 37: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 38: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:45:26 39: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 40: ::decode_with_tag_and_constraints at src/lib.rs:45:26 41: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 42: as rasn::de::Decode>::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:431:9 43: ::from_tag at src/lib.rs:33:26 44: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 45: ::decode at src/lib.rs:33:26 46: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 47: ::decode_with_tag_and_constraints at src/lib.rs:33:26 48: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 49: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:26:26 50: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 51: ::decode_with_tag_and_constraints at src/lib.rs:26:26 52: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 53: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 54: rasn::oer::decode at /Users/nicce/projects/vpki/rasn/src/oer.rs:13:5 55: rasn::coer::decode at /Users/nicce/projects/vpki/rasn/src/coer.rs:7:5 56: ieee1609dot2::tests::test_bsm_with_cert at src/lib.rs:767:9 57: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at src/lib.rs:766:29 58: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 59: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 test::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18 60: test::run_test_in_process::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 test::run_test_in_process at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27 test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43 61: test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41 std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18 62: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30 core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 63: as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17 64: __pthread_joiner_wake ) } }, codec: Oer, backtrace: Backtrace( 0: backtrace::backtrace::libunwind::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5 1: backtrace::backtrace::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14 2: backtrace::capture::Backtrace::create at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9 3: backtrace::capture::Backtrace::new at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22 4: ::generate at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snafu-0.7.5/src/backtrace_shim.rs:15:19 rasn::error::decode::DecodeError::from_kind at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:309:24 5: ::field_error at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:680:9 6: ::decode_with_tag_and_constraints::{{closure}}::{{closure}} at src/base_types.rs:87:26 7: core::result::Result::map_err at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:829:27 8: ::decode_with_tag_and_constraints::{{closure}} at src/base_types.rs:87:26 9: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 10: ::decode_with_tag_and_constraints at src/base_types.rs:87:26 11: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 12: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:512:34 13: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 14: ::decode_with_tag_and_constraints at src/lib.rs:512:34 15: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 16: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:347:34 17: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 18: ::decode_with_tag_and_constraints at src/lib.rs:347:34 19: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 20: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 21: ::decode_with_tag_and_constraints at src/lib.rs:425:25 22: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 23: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 24: ::decode_sequence_of at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:543:25 25: as rasn::de::Decode>::decode_with_tag_and_constraints at /Users/nicce/projects/vpki/rasn/src/de.rs:518:9 26: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 27: ::from_tag at src/lib.rs:231:26 28: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 29: ::decode at src/lib.rs:231:26 30: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 31: ::decode_with_tag_and_constraints at src/lib.rs:231:26 32: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 33: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:45:26 34: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 35: ::decode_with_tag_and_constraints at src/lib.rs:45:26 36: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 37: as rasn::de::Decode>::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:431:9 38: ::from_tag at src/lib.rs:33:26 39: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 40: ::decode at src/lib.rs:33:26 41: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 42: ::decode_with_tag_and_constraints at src/lib.rs:33:26 43: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 44: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:26:26 45: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 46: ::decode_with_tag_and_constraints at src/lib.rs:26:26 47: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 48: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 49: rasn::oer::decode at /Users/nicce/projects/vpki/rasn/src/oer.rs:13:5 50: rasn::coer::decode at /Users/nicce/projects/vpki/rasn/src/coer.rs:7:5 51: ieee1609dot2::tests::test_bsm_with_cert at src/lib.rs:767:9 52: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at src/lib.rs:766:29 53: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 54: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 test::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18 55: test::run_test_in_process::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 test::run_test_in_process at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27 test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43 56: test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41 std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18 57: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30 core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 58: as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17 59: __pthread_joiner_wake ) } }, codec: Oer, backtrace: Backtrace( 0: backtrace::backtrace::libunwind::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5 1: backtrace::backtrace::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14 2: backtrace::capture::Backtrace::create at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9 3: backtrace::capture::Backtrace::new at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22 4: ::generate at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snafu-0.7.5/src/backtrace_shim.rs:15:19 rasn::error::decode::DecodeError::from_kind at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:309:24 5: ::field_error at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:680:9 6: ::decode_with_tag_and_constraints::{{closure}}::{{closure}} at src/lib.rs:512:34 7: core::result::Result::map_err at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:829:27 8: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:512:34 9: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 10: ::decode_with_tag_and_constraints at src/lib.rs:512:34 11: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 12: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:347:34 13: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 14: ::decode_with_tag_and_constraints at src/lib.rs:347:34 15: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 16: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 17: ::decode_with_tag_and_constraints at src/lib.rs:425:25 18: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 19: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 20: ::decode_sequence_of at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:543:25 21: as rasn::de::Decode>::decode_with_tag_and_constraints at /Users/nicce/projects/vpki/rasn/src/de.rs:518:9 22: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 23: ::from_tag at src/lib.rs:231:26 24: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 25: ::decode at src/lib.rs:231:26 26: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 27: ::decode_with_tag_and_constraints at src/lib.rs:231:26 28: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 29: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:45:26 30: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 31: ::decode_with_tag_and_constraints at src/lib.rs:45:26 32: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 33: as rasn::de::Decode>::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:431:9 34: ::from_tag at src/lib.rs:33:26 35: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 36: ::decode at src/lib.rs:33:26 37: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 38: ::decode_with_tag_and_constraints at src/lib.rs:33:26 39: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 40: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:26:26 41: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 42: ::decode_with_tag_and_constraints at src/lib.rs:26:26 43: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 44: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 45: rasn::oer::decode at /Users/nicce/projects/vpki/rasn/src/oer.rs:13:5 46: rasn::coer::decode at /Users/nicce/projects/vpki/rasn/src/coer.rs:7:5 47: ieee1609dot2::tests::test_bsm_with_cert at src/lib.rs:767:9 48: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at src/lib.rs:766:29 49: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 50: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 test::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18 51: test::run_test_in_process::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 test::run_test_in_process at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27 test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43 52: test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41 std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18 53: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30 core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 54: as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17 55: __pthread_joiner_wake ) } }, codec: Oer, backtrace: Backtrace( 0: backtrace::backtrace::libunwind::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5 1: backtrace::backtrace::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14 2: backtrace::capture::Backtrace::create at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9 3: backtrace::capture::Backtrace::new at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22 4: ::generate at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snafu-0.7.5/src/backtrace_shim.rs:15:19 rasn::error::decode::DecodeError::from_kind at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:309:24 5: ::field_error at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:680:9 6: ::decode_with_tag_and_constraints::{{closure}}::{{closure}} at src/lib.rs:347:34 7: core::result::Result::map_err at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:829:27 8: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:347:34 9: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 10: ::decode_with_tag_and_constraints at src/lib.rs:347:34 11: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 12: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 13: ::decode_with_tag_and_constraints at src/lib.rs:425:25 14: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 15: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 16: ::decode_sequence_of at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:543:25 17: as rasn::de::Decode>::decode_with_tag_and_constraints at /Users/nicce/projects/vpki/rasn/src/de.rs:518:9 18: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 19: ::from_tag at src/lib.rs:231:26 20: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 21: ::decode at src/lib.rs:231:26 22: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 23: ::decode_with_tag_and_constraints at src/lib.rs:231:26 24: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 25: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:45:26 26: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 27: ::decode_with_tag_and_constraints at src/lib.rs:45:26 28: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 29: as rasn::de::Decode>::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:431:9 30: ::from_tag at src/lib.rs:33:26 31: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 32: ::decode at src/lib.rs:33:26 33: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 34: ::decode_with_tag_and_constraints at src/lib.rs:33:26 35: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 36: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:26:26 37: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 38: ::decode_with_tag_and_constraints at src/lib.rs:26:26 39: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 40: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 41: rasn::oer::decode at /Users/nicce/projects/vpki/rasn/src/oer.rs:13:5 42: rasn::coer::decode at /Users/nicce/projects/vpki/rasn/src/coer.rs:7:5 43: ieee1609dot2::tests::test_bsm_with_cert at src/lib.rs:767:9 44: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at src/lib.rs:766:29 45: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 46: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 test::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18 47: test::run_test_in_process::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 test::run_test_in_process at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27 test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43 48: test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41 std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18 49: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30 core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 50: as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17 51: __pthread_joiner_wake ) } }, codec: Oer, backtrace: Backtrace( 0: backtrace::backtrace::libunwind::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5 1: backtrace::backtrace::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14 2: backtrace::capture::Backtrace::create at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9 3: backtrace::capture::Backtrace::new at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22 4: ::generate at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snafu-0.7.5/src/backtrace_shim.rs:15:19 rasn::error::decode::DecodeError::from_kind at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:309:24 5: ::field_error at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:680:9 6: ::decode_with_tag_and_constraints::{{closure}}::{{closure}} at src/lib.rs:45:26 7: core::result::Result::map_err at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:829:27 8: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:45:26 9: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 10: ::decode_with_tag_and_constraints at src/lib.rs:45:26 11: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 12: as rasn::de::Decode>::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:431:9 13: ::from_tag at src/lib.rs:33:26 14: ::decode_choice at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:793:13 15: ::decode at src/lib.rs:33:26 16: ::decode_explicit_prefix at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:664:9 17: ::decode_with_tag_and_constraints at src/lib.rs:33:26 18: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 19: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:26:26 20: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 21: ::decode_with_tag_and_constraints at src/lib.rs:26:26 22: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 23: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 24: rasn::oer::decode at /Users/nicce/projects/vpki/rasn/src/oer.rs:13:5 25: rasn::coer::decode at /Users/nicce/projects/vpki/rasn/src/coer.rs:7:5 26: ieee1609dot2::tests::test_bsm_with_cert at src/lib.rs:767:9 27: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at src/lib.rs:766:29 28: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 29: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 test::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18 30: test::run_test_in_process::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 test::run_test_in_process at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27 test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43 31: test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41 std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18 32: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30 core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 33: as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17 34: __pthread_joiner_wake ) } }, codec: Oer, backtrace: Backtrace( 0: backtrace::backtrace::libunwind::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5 backtrace::backtrace::trace_unsynchronized at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5 1: backtrace::backtrace::trace at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14 2: backtrace::capture::Backtrace::create at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9 3: backtrace::capture::Backtrace::new at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22 4: ::generate at /Users/nicce/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snafu-0.7.5/src/backtrace_shim.rs:15:19 rasn::error::decode::DecodeError::from_kind at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:309:24 5: ::field_error at /Users/nicce/projects/vpki/rasn/src/error/decode.rs:680:9 6: ::decode_with_tag_and_constraints::{{closure}}::{{closure}} at src/lib.rs:26:26 7: core::result::Result::map_err at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:829:27 8: ::decode_with_tag_and_constraints::{{closure}} at src/lib.rs:26:26 9: ::decode_sequence at /Users/nicce/projects/vpki/rasn/src/oer/de.rs:520:25 10: ::decode_with_tag_and_constraints at src/lib.rs:26:26 11: rasn::de::Decode::decode_with_tag at /Users/nicce/projects/vpki/rasn/src/de.rs:32:9 12: rasn::de::Decode::decode at /Users/nicce/projects/vpki/rasn/src/de.rs:23:9 13: rasn::oer::decode at /Users/nicce/projects/vpki/rasn/src/oer.rs:13:5 14: rasn::coer::decode at /Users/nicce/projects/vpki/rasn/src/coer.rs:7:5 15: ieee1609dot2::tests::test_bsm_with_cert at src/lib.rs:767:9 16: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at src/lib.rs:766:29 17: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 18: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 test::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:626:18 19: test::run_test_in_process::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:60 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 test::run_test_in_process at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:649:27 test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:572:43 20: test::run_test::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/test/src/lib.rs:600:41 std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:154:18 21: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:529:17 as core::ops::function::FnOnce<()>>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panic/unwind_safe.rs:271:9 std::panicking::try::do_call at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502:40 std::panicking::try at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466:19 std::panic::catch_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142:14 std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/thread/mod.rs:528:30 core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 22: as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 as core::ops::function::FnOnce>::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17 23: __pthread_joiner_wake ) } stack backtrace: 0: rust_begin_unwind at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5 1: core::panicking::panic_fmt at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14 2: core::result::unwrap_failed at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5 3: core::result::Result::unwrap at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1077:23 4: ieee1609dot2::tests::test_bsm_with_cert at ./src/lib.rs:767:9 5: ieee1609dot2::tests::test_bsm_with_cert::{{closure}} at ./src/lib.rs:766:29 6: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 7: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ```
XAMPPRocky commented 1 year ago

Thank you for your issue! I agree we should have a good pretty print.

I think the ambition should be Rust's error's, it should be immediately obvious, the error should not be noisy.

There's likely an error formatting library we can take advantage of.

I think part of this should be that we trim the backtrace by default to show like three lines, ideally not from the libraries or rasn, and to have a method for the full backtrace.

Nicceboy commented 1 year ago

For conditional full backtrace, I was thinking either direct --cfg flags for compiler or env variables ( like RUST_LIB_BACKTRACE or RUST_BACKTRACE), since it is mostly useful for developers which relies on and compiles the library and less likely needed for-end users (at least now), which do not compile the library.

Since the library supports #![no_std], env variables should be added with build scripts. If someone wants to get full backtraces on embedded systems without recompilation, they can be warned that add it on compile time for now.

I guess making it as encoder/decoder option is alternative too, maybe later.

XAMPPRocky commented 1 year ago

That's a good point about no_std, I think my preference would be a cargo feature rather than cfg, because that's more intuitive to use than cfg variables.

I think the "warning" would be included in the backtrace, similar to how RUST_BACKTRACE works.