Log warning instead of error when failing to decode RON in storage (#2961)
* Log warning instead of error when failing to decode RON in storage * New web demo * Clean up some warn/error logging * Avoid deadlock that could happen on crash * Log errors using console.warn, because console.error can cause crashes * Use patched version of wasm-bindgen-cli, allowing >2GB memory * New web demo
This commit is contained in:
@@ -37,7 +37,11 @@ impl log::Log for WebLogger {
|
||||
log::Level::Debug => console::debug(&msg),
|
||||
log::Level::Info => console::info(&msg),
|
||||
log::Level::Warn => console::warn(&msg),
|
||||
log::Level::Error => console::error(&msg),
|
||||
|
||||
// Using console.error causes crashes for unknown reason
|
||||
// https://github.com/emilk/egui/pull/2961
|
||||
// log::Level::Error => console::error(&msg),
|
||||
log::Level::Error => console::warn(&format!("ERROR: {msg}")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +70,11 @@ mod console {
|
||||
#[wasm_bindgen(js_namespace = console)]
|
||||
pub fn warn(s: &str);
|
||||
|
||||
/// `console.error`
|
||||
#[wasm_bindgen(js_namespace = console)]
|
||||
pub fn error(s: &str);
|
||||
// Using console.error causes crashes for unknown reason
|
||||
// https://github.com/emilk/egui/pull/2961
|
||||
// /// `console.error`
|
||||
// #[wasm_bindgen(js_namespace = console)]
|
||||
// pub fn error(s: &str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user