diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2022-12-09 14:57:57 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2022-12-28 16:54:42 +0100 |
| commit | cb7c8993b957d279f9ae0a07983c4560ca725ac2 (patch) | |
| tree | bcdae263df8b4bb996c4910e307abf5781a14034 /library/std/src/panic.rs | |
| parent | 14ca83a04b00433a8caf3b805d5ea08cb2691e1b (diff) | |
| download | rust-cb7c8993b957d279f9ae0a07983c4560ca725ac2.tar.gz rust-cb7c8993b957d279f9ae0a07983c4560ca725ac2.zip | |
Clarify catch_unwind docs about panic hooks
Makes it clear from catch_unwind docs that the panic hook will be called before the panic is caught.
Diffstat (limited to 'library/std/src/panic.rs')
| -rw-r--r-- | library/std/src/panic.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index c4f022de021..9fa8f5702a8 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -114,6 +114,9 @@ where /// aborting the process as well. This function *only* catches unwinding panics, /// not those that abort the process. /// +/// Note that if a custom panic hook has been set, it will be invoked before +/// the panic is caught, before unwinding. +/// /// Also note that unwinding into Rust code with a foreign exception (e.g. /// an exception thrown from C++ code) is undefined behavior. /// |
