Catch_unwind not catching?

I'm trying to catch all panics that happen in certain user code, but this isn't even catching a generic panic invocation :confused:
Catch point:

Future from unit test:

Logs: (note the lack of the warning that should happen if it did catch it)

It's panicking on the line before it calls inner_poll, which isn't wrapped in a catch_unwind, you should use RUST_BACKTRACE=1 to see where the panic comes from:

  11: std::panicking::begin_panic
             at /rustc/91fd6283e658e2c7aab2d3f5206fc1891f486af2/src/libstd/
  12: axiom::system::tests::test_monitor_gets_panics_errors::{{closure}}
             at src/
  13: axiom::actors::Actor::new::{{closure}}
             at src/
  14: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
             at /rustc/91fd6283e658e2c7aab2d3f5206fc1891f486af2/src/liballoc/
  15: <axiom::actors::ActorStream as futures_core::stream::Stream>::poll_next
             at src/
  16: axiom::executor::Task::poll
             at src/

Ahh.... so there was a problem in my understanding of delayed execution: functions that are "async" but aren't completely wrapped in the async codegen will execute up to the future that makes it an async function.

Thank you very much!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.