diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-28 22:22:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 22:22:19 +0100 |
| commit | 0b7ed65c13064ff1afe334bb781c02d172f54a48 (patch) | |
| tree | 7be5b28f1c3c463e029d8da7cefe575aa7f14100 | |
| parent | 22060f20ae0b92acd056c4f2c79d19dd1b73ab5c (diff) | |
| parent | cb7c8993b957d279f9ae0a07983c4560ca725ac2 (diff) | |
| download | rust-0b7ed65c13064ff1afe334bb781c02d172f54a48.tar.gz rust-0b7ed65c13064ff1afe334bb781c02d172f54a48.zip | |
Rollup merge of #105497 - albertlarsan68:doc-panic-hook-and-catch-unwind, r=m-ou-se
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. Fixes #105432
| -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. /// |
