Expand description
Stateful error boundary.
ErrorBoundary catches panics thrown from its content closure (reliable on
native) and also supports a WASM-safe failure path via throw_boundary:
panics abort on wasm32-unknown-unknown builds compiled with
panic = "abort", so catch_unwind is best-effort there.
The boundary is sticky: once a fallback is shown it stays until the reset
callback fires. This prevents a panicking leaf from re-panicking every frame
and means the Reset button lives in the fallback, not the failing content.
Structs§
- Error
Info - Details about a boundary trip, passed to the fallback.
Functions§
- Error
Boundary - Render
fallbackwhencontentpanics (native) or callsthrow_boundary, and stay in fallback untilreset()runs.fallback(info, reset)receives the error and a closure that clears the error and re-enterscontent. - throw_
boundary - Call from inside a boundary’s content to trip the fallback without
panic!. This is the WASM-safe path.