Open
Description
Specific Demand
In react, if you throw an exception, it'll get caught by the react machinery as an error at the nearest error boundary.
WASM does not have the ability to catch panics properly, but non-wasm targets do.
We should catch panics in tasks and suspense and bubble them to the nearest error boundary if possible.
This is pretty straightforward by simply wrapping the scheduler poll logic with a panic handler.
Implement Suggestion
This comes in two parts
- Add panic handling to rust for wasm targets
- Wrap the scheduler logic with a panic handler