Skip to content

ErrorBoundary support for multiple exceptions #38905

@thirstyape

Description

@thirstyape

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 #30874 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-error-boundary

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions