web: Use PanicInfo::to_string for displaying panic info
PanicInfo::payload wasn't giving anything useful (just resulted in 'Unknown error') -- to_string displays all of the message, payload, and location of the panic. Particularly the location is helpful.
This commit is contained in:
parent
2c9cf6802d
commit
4034ef8d79
|
@ -875,11 +875,7 @@ pub fn set_panic_handler() {
|
||||||
RUFFLE_GLOBAL_PANIC.call_once(|| {
|
RUFFLE_GLOBAL_PANIC.call_once(|| {
|
||||||
console_error_panic_hook::hook(info);
|
console_error_panic_hook::hook(info);
|
||||||
|
|
||||||
let error = JsError::new(
|
let error = JsError::new(&info.to_string());
|
||||||
info.payload()
|
|
||||||
.downcast_ref::<&str>()
|
|
||||||
.unwrap_or(&"Unknown panic"),
|
|
||||||
);
|
|
||||||
let _ = INSTANCES.try_with(|instances| {
|
let _ = INSTANCES.try_with(|instances| {
|
||||||
let mut players = Vec::new();
|
let mut players = Vec::new();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue