Blazor Hybrid WinForms apps give error if there's an ErrorBoundary
See original GitHub issueDescription
Ironically it’s the ErrorBoundary
that causes the error.
This may also affect WPF/MAUI but I haven’t tried those yet.
Steps to Reproduce
Put <ErrorBoundary>
inside a Blazor Hybrid WinForms app.
Fix: We need to add a default IErrorBoundaryLogger
to the DI container. Presumably it should just log to console.
Version with bug
Preview 12 (current)
Last version that worked well
Unknown/Other
Affected platforms
Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
All
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Handle errors in ASP.NET Core Blazor apps
Error boundaries provide a convenient approach for handling exceptions. The ErrorBoundary component: Renders its child content when an error ...
Read more >Blazor Best Practices: Handling Errors
Error boundaries can contain unhandled exceptions and keep your Blazor Server app running even though one component has failed. Whether you're ...
Read more >Blazor WebAssembly Exception Handling With Error ...
Blazor WebAssembly Error Boundaries allow us to manage unhandled exceptions and display custom error UI when an unhandled exception occurs.
Read more >Catch and display on the page any error in a .NET Maui ...
Trying to decipher the error, on first look, it seems that the type ErrorBoudary that you inherit needs a dependency that is not...
Read more >Global exception handling with MessageBoxes : r/Blazor
There is a out-of-the-box component called ErrorBoundary. It allows you to catch exceptions thrown by UI or logic called by child components. By ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@SteveSandersonMS As long as we use ILogger I think it’s fine.
Then people can choose whether to log to the console or a different ILogger implementation, my point was about doing something like
Console.WriteLine
by default; Although we should ask/figure the Maui/WF/WPF story for logging to make sure we have a proper E2E.@Eilon we should patch this.