1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

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:
Emil Ernerfeldt
2023-04-27 09:45:44 +02:00
committed by GitHub
parent f76eefb98d
commit 3d6a15f442
10 changed files with 41 additions and 29 deletions

View File

@@ -529,7 +529,7 @@ impl AppRunnerRef {
log::debug!("Unsubscribing from {} events", events_to_unsubscribe.len());
for x in events_to_unsubscribe {
if let Err(err) = x.unsubscribe() {
log::error!("Failed to unsubscribe from event: {err:?}");
log::warn!("Failed to unsubscribe from event: {err:?}");
}
}
}
@@ -560,7 +560,7 @@ impl AppRunnerRef {
if self.has_panicked() {
None
} else {
let lock = self.runner.borrow_mut();
let lock = self.runner.try_borrow_mut().ok()?;
if lock.is_destroyed.fetch() {
None
} else {