File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ panics can only be caught by the parent thread. This means catching a panic
31
31
requires spinning up an entire OS thread! This unfortunately stands in conflict
32
32
to Rust's philosophy of zero-cost abstractions.
33
33
34
- There is an API called ` catch_panic ` that enables catching a panic
34
+ There is an API called [ ` catch_unwind ` ] [ catch_unwind ] that enables catching a panic
35
35
without spawning a thread. Still, we would encourage you to only do this
36
36
sparingly. In particular, Rust's current unwinding implementation is heavily
37
37
optimized for the "doesn't unwind" case. If a program doesn't unwind, there
@@ -47,3 +47,5 @@ You must *absolutely* catch any panics at the FFI boundary! What you do at that
47
47
point is up to you, but * something* must be done. If you fail to do this,
48
48
at best, your application will crash and burn. At worst, your application * won't*
49
49
crash and burn, and will proceed with completely clobbered state.
50
+
51
+ [ catch_unwind ] : https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
You can’t perform that action at this time.
0 commit comments