Avalonia .NET10 Global exception handling fails on macOS
Open
area-VM-coreclr
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
I attached two exception listener events in App.axaml.cs. They work well on the Windows system, capturing exceptions from anywhere and logging them. However, when I debug on macOS, program crashes are not caught by these events.
`AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
if (e.ExceptionObject is Exception ex)
HandleUnhandledException(ex, "AppDomain.UnhandledException");
};
TaskScheduler.UnobservedTaskException += (sender, e) =>
{
HandleUnhandledException(e.Exception, "TaskScheduler.UnobservedTaskException");
};`
Contributor guide
Assessment
This issue has not been assessed yet.