We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 493e2cf commit 23c87f6Copy full SHA for 23c87f6
desktop/src/main.rs
@@ -81,18 +81,8 @@ fn panic_hook(info: &PanicHookInfo) {
81
}
82
});
83
84
- // [NA] Let me just point out that PanicInfo::message() exists but isn't stable and that sucks.
85
- let panic_text = info.to_string();
86
- let message = if let Some(text) = panic_text.strip_prefix("panicked at '") {
87
- let location = info.location().map(|l| l.to_string()).unwrap_or_default();
88
- if let Some(text) = text.strip_suffix(&format!("', {location}")) {
89
- text.trim()
90
- } else {
91
92
- }
93
94
- panic_text.trim()
95
- };
+ let message = info.payload_as_str().unwrap_or("panic occurred");
+
96
if rfd::MessageDialog::new()
97
.set_level(rfd::MessageLevel::Error)
98
.set_title("Ruffle")
0 commit comments