Hacker News new | ask | show | jobs
by Raicuparta 699 days ago
catch_unwind doesn't catch all panics. I imagine that running a thread would actually catch all panics, but I don't know enough about the subject to say that confidently.

https://doc.rust-lang.org/std/panic/fn.catch_unwind.html#not...

1 comments

Aborting panics won't by caught by threads either.

And they are common only in two scenarios: if you set panic="abort", or special UB checks that the standard library does. The former is just a simple configuration change, the latter is not really something you can handle in any way.