]> git.lizzy.rs Git - rust.git/commitdiff
adjust message on non-unwinding panic
authorRalf Jung <post@ralfj.de>
Wed, 21 Dec 2022 12:55:54 +0000 (13:55 +0100)
committerRalf Jung <post@ralfj.de>
Wed, 28 Dec 2022 09:38:04 +0000 (10:38 +0100)
library/std/src/panicking.rs

index 1039835bbbdfe5430d9f5175ed28b7b4d11ef883..49c2f81403a9bfc037c22d691d81c83b79c9c4fd 100644 (file)
@@ -699,7 +699,11 @@ fn rust_panic_with_hook(
         // have limited options. Currently our preference is to
         // just abort. In the future we may consider resuming
         // unwinding or otherwise exiting the thread cleanly.
-        rtprintpanic!("thread panicked while panicking. aborting.\n");
+        if !can_unwind {
+            rtprintpanic!("thread caused non-unwinding panic. aborting.\n");
+        } else {
+            rtprintpanic!("thread panicked while panicking. aborting.\n");
+        }
         crate::sys::abort_internal();
     }