-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Milestone
Description
When we throw here:
aspnetcore/src/Components/Components/src/RenderTree/RenderTreeDiffBuilder.cs
Lines 748 to 749 in 9941a37
default: | |
throw new NotImplementedException($"Encountered unsupported frame type during diffing: {newTree[newFrameIndex].FrameTypeField}"); |
We can use the DiffContext to (using the Renderer, get the ComponentState for the current component, get the Component and get the type for the component.
We should add a private static CreateDiffErrorMessage that we can call to:
- Collect this information.
- Produce a more detailed error message that includes:
- The component type (maybe the set of component types walking through the component state Parent property up to the root component)
- The newTree set of frame types up to the failing frame as well as the length.
An example would be something like this:
Encountered an unsupported frame type during diffing {newTree[newFrameIndex].FrameTypeField} for Component Path: 'RootType -> Child -> GrandChild -> ErrorComponent' on tree with length 'N' and contents 'FirstFrameType, SecondFrameType, ThirdFrameType'.
Copilot
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components