[blazor] Add parameter to ErrorBoundary to let it render ChildContent when an exception was thrown#66159
[blazor] Add parameter to ErrorBoundary to let it render ChildContent when an exception was thrown#66159zachneu wants to merge 2 commits intodotnet:mainfrom
Conversation
|
@dotnet-policy-service agree |
296dab1 to
bd09492
Compare
bd09492 to
53e5a47
Compare
|
Thanks for the contribution @zachneu! We appreciate your interest in improving the However, per our contribution policy, we ask that contributors file an issue and discuss the design with the team before submitting a pull request. Specifically:
Additionally, for feature work like this, we encourage you to file a design proposal issue so the team can review the approach before significant effort is invested:
Could you please open an issue describing the scenario and proposed design so the team can discuss it first? |
Yes, @javiercn I can do that, but this have been something that has been asked for many places for long time, so I though to investigate what would be required to actually solve this, instead of spending time on open an issue, as the current version of errorboundary is basically useless for our needs. |
cc89dec to
b4945b5
Compare
b4945b5 to
3c10ca6
Compare
3c10ca6 to
0e7d02c
Compare
This is extending ErrorBoundary for handling exceptions in Blazor without being forced to render something else (by using ErrorContent) than the component that throw the exception. This is to:
It can be used like
<ErrorBoundary RenderOnException="true">...</ErrorBoundary>Or your own component with custom OnErrorAsync like
<ErrorBoundaryTest RenderOnException="true">...</ErrorBoundaryTest>##66214