Y
Hacker News
new
|
ask
|
show
|
jobs
by
wizzwizz4
663 days ago
Catching panics is best-effort only. In general, Rust panics can't be caught. (Even if a program is compiled with panic=unwind, this can change to abort at run-time.)
1 comments
forrestthewoods
663 days ago
I don’t think that’s correct. Panics can be configured to abort instead of unwind. But if panic != abort then catching should be reliable.
https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
link
https://doc.rust-lang.org/std/panic/fn.catch_unwind.html