ErrorBoundary support for multiple exceptions
See original GitHub issueAm I using this incorrectly? I implemented as per Documentation in MainLayout.razor
with the slight change that in my <ErrorContent>
section I added a button that triggers errorBoundary?.Recover();
.
My test involved throwing a generic exception with a message from a child component in protected override void OnInitialized()
. The result was that instead of displaying the content of @Body
or the ErrorContent, there was nothing. Upon opening the browser inspector I had an empty <main></main>
.
I also tried creating a custom class that implemented ErrorBoundary, but this did not help either.
_Originally posted by @thirstyape in https://github.com/dotnet/aspnetcore/issues/30874#issuecomment-989263259_
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
Catch all exceptions globally with ErrorBoundary
The ErrorBoundary component can catch exceptions in the Telerik Blazor components as well. The usual approach to catch all exceptions is to wrap...
Read more >Error Boundaries
Error boundaries are React components that catch JavaScript errors anywhere ... a very limited support for error boundaries under a different method name: ......
Read more >React error handling with react-error-boundary
When building applications, errors are inevitable. In this article, we'll examine React error handling using react-error-boundary.
Read more >ErrorBoundary
An ErrorBoundary is a React component that renders whenever there is an error anywhere on the route, either during rendering or during data...
Read more >Building an Error Handling Layer in React - Semaphore CI
Learn what an error handling layer is, understand why your React app should have one, and see two approaches to building an error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Are there any updates on this topic? One year later it seems multiple exceptions at once are not supported by ErrorBoundary. The ErrorContent won’t render.
Thanks @thirstyape, let’s keep this issue open to track potentially adding support for multiple exceptions in the future.