Remove unnecessary exit
DELETE
WalletWasabi.Gui/CrashReport/Helpers/StartCrashReporterHelper.cs
-using System.Reflection;
-using Avalonia;
-using System;
-using WalletWasabi.Logging;
-using Newtonsoft.Json;
-using System.Diagnostics;
-using WalletWasabi.Models;
-
-namespace WalletWasabi.Gui.CrashReport.Helpers
-{
- public static class StartCrashReporterHelper
- {
- public static void Start(Exception e, int prevAttempts)
- {
- if (prevAttempts >= 5)
- {
- Logger.LogCritical("The crash helper has been called 5 times. Will not continue to avoid recursion errors.");
- Environment.Exit(-1);
- }
-
- var jsonException = JsonConvert.SerializeObject(new SerializableException(e), Formatting.None);
-
- var args = $"crashreport -attempt={prevAttempts + 1} -exception={jsonException}";
-
- new Process()
- {
- StartInfo = new ProcessStartInfo()
- {
- FileName = Process.GetCurrentProcess().MainModule.FileName,
- Arguments = $"{args}",
- UseShellExecute = true
- }
- }.Start();
-
- Environment.Exit(1);
- return;
- }
- }
-}

MODIFY
WalletWasabi.Gui/CrashReport/Views/CrashReportWindow.xaml.cs
WalletWasabi.Gui/CrashReport/Views/CrashReportWindow.xaml.cs
@@ -15,12 +15,6 @@ namespace WalletWasabi.Gui.CrashReport.Views
#if DEBUG
this.AttachDevTools();
#endif
- Closing += CrashReportWindow_ClosingAsync;
- }
-
- private void CrashReportWindow_ClosingAsync(object sender, CancelEventArgs e)
- {
- Environment.Exit(0);
}
private void InitializeComponent()

MODIFY
WalletWasabi.Gui/Properties/launchSettings.json
WalletWasabi.Gui/Properties/launchSettings.json
"profiles": {
"WalletWasabi.Gui": {
"commandName": "Project",
- "commandLineArgs": "crashreport -attempt=2 -exception=eyJFeGNlcHRpb25UeXBlIjoiU3lzdGVtLkV4Y2VwdGlvbiIsIk1lc3NhZ2UiOiJteSBkdW1teSBleGNlcHRpb24iLCJTdGFja1RyYWNlIjoiICAgYXQgV2FsbGV0V2FzYWJpLkd1aS5HbG9iYWwuSW5pdGlhbGl6ZU5vV2FsbGV0QXN5bmMoKSBpbiBDOlxcd29ya1xcV2FsbGV0V2FzYWJpXFxXYWxsZXRXYXNhYmkuR3VpXFxHbG9iYWwuY3M6bGluZSAxMjZcclxuICAgYXQgV2FsbGV0V2FzYWJpLkd1aS5Qcm9ncmFtLkFwcE1haW5Bc3luYyhTdHJpbmdbXSBhcmdzKSBpbiBDOlxcd29ya1xcV2FsbGV0V2FzYWJpXFxXYWxsZXRXYXNhYmkuR3VpXFxQcm9ncmFtLmNzOmxpbmUgNzEiLCJJbm5lckV4Y2VwdGlvbiI6bnVsbH0="
+ "commandLineArgs": "crashreport -attempt=6 -exception=eyJFeGNlcHRpb25UeXBlIjoiU3lzdGVtLkV4Y2VwdGlvbiIsIk1lc3NhZ2UiOiJteSBkdW1teSBleGNlcHRpb24iLCJTdGFja1RyYWNlIjoiICAgYXQgV2FsbGV0V2FzYWJpLkd1aS5HbG9iYWwuSW5pdGlhbGl6ZU5vV2FsbGV0QXN5bmMoKSBpbiBDOlxcd29ya1xcV2FsbGV0V2FzYWJpXFxXYWxsZXRXYXNhYmkuR3VpXFxHbG9iYWwuY3M6bGluZSAxMjZcclxuICAgYXQgV2FsbGV0V2FzYWJpLkd1aS5Qcm9ncmFtLkFwcE1haW5Bc3luYyhTdHJpbmdbXSBhcmdzKSBpbiBDOlxcd29ya1xcV2FsbGV0V2FzYWJpXFxXYWxsZXRXYXNhYmkuR3VpXFxQcm9ncmFtLmNzOmxpbmUgNzEiLCJJbm5lckV4Y2VwdGlvbiI6bnVsbH0="
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Tests/UnitTests/GUI/CommandInterpreterTest.cs
WalletWasabi.Tests/UnitTests/GUI/CommandInterpreterTest.cs
@@ -83,6 +83,7 @@ Available commands are:
mixer
findpassword
+ crashreport
", outW.ToString());
Assert.Equal(
@"wassabee: Unknown command: invalid

Remove unnecessary exit