Closed
Description
The LogPlugin
silently overwrites the panic handler on WASM. This means if you attempt to set your own panic handler, or use something like https://github.com/vectorgameexperts/web_panic_report, you have to overwrite it on Startup (thus, your panic handler can't be added until Startup)
Problematic code:
bevy/crates/bevy_log/src/lib.rs
Lines 206 to 212 in 5d0ff60
This should not be considered acceptable default behavior.
3 options here, open to discussion.
- (1) Provide a hook to the LogPlugin
- (2) Take it out (my preferred answer - Logging really has nothing to do with panicking.)
- (3) Consume the previous hook and wrap it, e.g.
bevy/crates/bevy_log/src/lib.rs
Lines 136 to 140 in 5d0ff60