-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Labels
Pillar: Technical DebtPriority:3Work that is nice to haveWork that is nice to havearea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-blazor-error-boundary
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
ErrorBoundary renders nothing when there are two different errors inside it's ChildContent.
Expected Behavior
ErrorBoundary renders exception information.
Steps To Reproduce
App.razor
<ErrorBoundary>
<ChildContent>
<ComponentWithError />
</ChildContent>
<ErrorContent>
<div style="background: red">@context</div>
</ErrorContent>
</ErrorBoundary>
ComponentWithError.razor
@{
throw new Exception("error2");
}
@code
{
protected override async Task OnInitializedAsync()
{
throw new Exception("error");
}
}
Exceptions (if any)
No response
.NET Version
6.0.101
Anything else?
I originally ran into this problem when I misspelled the parameter name in the inner component of ComponentWithError
:
<ComponentWithoutProp BadProp=1 />
Which throws an exception by itself.
Also with exception inside void OnInitialized()
everything works fine.
plastovicka, xiety, AMUCOMO, brackers17, BrunoJuchli and 1 moreMike-E-angeloAMUCOMOCopilot
Metadata
Metadata
Assignees
Labels
Pillar: Technical DebtPriority:3Work that is nice to haveWork that is nice to havearea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-blazor-error-boundary