Skip to content

Commit b804c0d

Browse files
committed
adjust message on non-unwinding panic
1 parent 1d12c3c commit b804c0d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

library/std/src/panicking.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,11 @@ fn rust_panic_with_hook(
699699
// have limited options. Currently our preference is to
700700
// just abort. In the future we may consider resuming
701701
// unwinding or otherwise exiting the thread cleanly.
702-
rtprintpanic!("thread panicked while panicking. aborting.\n");
702+
if !can_unwind {
703+
rtprintpanic!("thread caused non-unwinding panic. aborting.\n");
704+
} else {
705+
rtprintpanic!("thread panicked while panicking. aborting.\n");
706+
}
703707
crate::sys::abort_internal();
704708
}
705709

0 commit comments

Comments
 (0)