3 ms·
Kinda sorta. My knowledge is limited on the topic, but AFAIK, unwinding for Rust is designed to have at most one try/catch block per thread. That said, there i
by burntsushi 11y ago
Kinda sorta. My knowledge is limited on the topic, but AFAIK, unwinding for Rust is designed to have at most one try/catch block per thread.
That said, there is a `catch_panic` function (http://doc.rust-lang.org/std/thread/fn.catch_panic.html http://doc.rust-lang.org/std/thread/fn.catch_panic.html), but it's unstable. So in stable Rust, the only way to catch a panic is to spawn a new thread, I think.