using Microsoft.UI.Xaml; using System.Diagnostics; namespace cfs_tracker.WinUI; public partial class App : MauiWinUIApplication { public App() { this.InitializeComponent(); UnhandledException += OnUnhandledException; } private void OnUnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) { Debug.WriteLine("WINUI UNHANDLED EXCEPTION:"); Debug.WriteLine(e.Message); if (e.Exception is not null) Debug.WriteLine(e.Exception.ToString()); } protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); }