[skip ci] Improve exception handling.
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -295,6 +295,8 @@ namespace WalletWasabi.Gui
}
public static async Task DisposeAsync()
+ {
+ try
{
await DisposeInWalletDependentServicesAsync();
@@ -317,5 +319,10 @@ namespace WalletWasabi.Gui
Logger.LogInfo($"{nameof(RegTestMemPoolServingNode)} is disposed.", nameof(Global));
}
}
+ catch (Exception ex)
+ {
+ Logger.LogWarning(ex, nameof(Global));
+ }
+ }
}
}

MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -24,10 +24,8 @@ namespace WalletWasabi.Gui
Platform.BaseDirectory = Path.Combine(Global.DataDir, "Gui");
BuildAvaloniaApp().BeforeStarting(async builder =>
{
- try
- {
- MainWindowViewModel.Instance = new MainWindowViewModel();
Logger.InitializeDefaults(Path.Combine(Global.DataDir, "Logs.txt"));
+ MainWindowViewModel.Instance = new MainWindowViewModel();
var configFilePath = Path.Combine(Global.DataDir, "Config.json");
var config = new Config(configFilePath);
@@ -54,16 +52,12 @@ namespace WalletWasabi.Gui
{
MainWindowViewModel.Instance.Title += $" - {Global.IndexDownloader.Network}";
}
- }
- catch (Exception ex)
- {
- Logger.LogCritical<Program>(ex);
- }
}).StartShellApp<AppBuilder, MainWindow>("Wasabi Wallet", null, () => MainWindowViewModel.Instance);
}
catch (Exception ex)
{
Logger.LogCritical<Program>(ex);
+ throw;
}
finally
{

MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -18,8 +18,8 @@ namespace WalletWasabi.Packager
// 1. Publish with Packager.
// 2. Build WIX project with Release and x64 configuration.
// 3. Sign with Packager.
- bool doPublish = false;
- bool doSign = true;
+ bool doPublish = true;
+ bool doSign = false;
string packagerProjectDirectory = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..\\..\\..\\"));
string solutionDirectory = Path.GetFullPath(Path.Combine(packagerProjectDirectory, "..\\"));

[skip ci] Improve exception handling.