CsWinRT
CsWinRT copied to clipboard
Unable to get the correct type of exception
Describe the bug
When a custom exception is triggered, the correct exception type cannot be obtained in the unhandled exception event.
Steps to reproduce the bug
Attach the UnhandledException event
public App()
{
this.InitializeComponent();
UnhandledException += OnUnhandledException;
}
private void OnUnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
{
}
Throws a custom exception
public sealed partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
}
private void myButton_Click(object sender, RoutedEventArgs e)
{
throw new KnownException("LOB Warning");
}
}
public class KnownException : Exception
{
public KnownException(string p_message)
: base(p_message)
{
}
}
Unable to get the correct type of exception
Expected behavior
No response
Screenshots
No response
NuGet package version
1.0.0
Packaging type
Packaged (MSIX)
Windows version
No response
IDE
Visual Studio 2022-preview
Additional context
No response
Please check if it is a bug.
I'm facing the same issue. Will this bug ever be fixed?