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: https://files.khionu.net/ss/20191117_e3e914.png (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/panicking.rs:400
  12: axiom::system::tests::test_monitor_gets_panics_errors::{{closure}}
             at src/system.rs:1232
  13: axiom::actors::Actor::new::{{closure}}
             at src/actors.rs:818
  14: <alloc::boxed::Box<F> as core::ops::function::FnMut<A>>::call_mut
             at /rustc/91fd6283e658e2c7aab2d3f5206fc1891f486af2/src/liballoc/boxed.rs:949
  15: <axiom::actors::ActorStream as futures_core::stream::Stream>::poll_next
             at src/actors.rs:925
  16: axiom::executor::Task::poll
             at src/executor.rs:353
2 Likes

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.