modify `RxApp.DefaultExceptionHandler`
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
+using System.Diagnostics;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Dialogs;
using Avalonia.ReactiveUI;
using Splat;
using System.IO;
+using System.Reactive;
+using System.Reactive.Concurrency;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
+using ReactiveUI;
using WalletWasabi.Fluent.CrashReport;
using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.ViewModels;
@@ -71,6 +75,18 @@ public class Program
Services.Initialize(Global, singleInstanceChecker);
+ RxApp.DefaultExceptionHandler = Observer.Create<Exception>(ex =>
+ {
+ if (Debugger.IsAttached)
+ {
+ Debugger.Break();
+ }
+
+ Logger.LogError(ex);
+
+ RxApp.MainThreadScheduler.Schedule(() => throw ex);
+ });
+
Logger.LogSoftwareStarted("Wasabi GUI");
BuildAvaloniaApp()
.AfterSetup(_ => ThemeHelper.ApplyTheme(Global.UiConfig.DarkModeEnabled ? Theme.Dark : Theme.Light))

modify `RxApp.DefaultExceptionHandler`