question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ErrorBoundary support for multiple exceptions

See original GitHub issue

Am 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:open
  • Created 2 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
eduard-tapkeycommented, Feb 10, 2023

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.

1reaction
TanayParikhcommented, Dec 14, 2021

Thanks @thirstyape, let’s keep this issue open to track potentially adding support for multiple exceptions in the future.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found