DioxusLabs / DioxusLabs/dioxus
The error-boundary example code causes infinite loop
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
https://dioxuslabs.com/learn/0.7/essentials/basics/error_handling/#downcasting-specific-errors
The example code to downcast an error and rethrow if necessary causes an infinite loop
```
rsx! {
ErrorBoundary {
handle_error: |error: ErrorContext| {
// Network errors need to be handled by a different error boundary!
if let Some(err) = error.error() {
return Err(e.into())
}
// Otherwise, handle this error here
rsx! {
div { "Oops, we encountered an error" }
}
},
// ...
}
}
```
- Dioxus version: 0.7.1
- Rust version: 1.91.1
- OS info: WSL2
- App platform: web
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.