about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-12-21 13:55:54 +0100
committerRalf Jung <post@ralfj.de>2022-12-28 10:38:04 +0100
commitb804c0d5a54dee10a59fc2b3d54037cb96fbb598 (patch)
treec11046f85f80cdc7cf917f09276a8bfa8605b55d
parent1d12c3cea30b8ba4a09650a9e9c46fe9fbe25f0b (diff)
downloadrust-b804c0d5a54dee10a59fc2b3d54037cb96fbb598.tar.gz
rust-b804c0d5a54dee10a59fc2b3d54037cb96fbb598.zip
adjust message on non-unwinding panic
-rw-r--r--library/std/src/panicking.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs
index 1039835bbbd..49c2f81403a 100644
--- a/library/std/src/panicking.rs
+++ b/library/std/src/panicking.rs
@@ -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();
     }