Improve wallet load ex
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ClosedWalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/ClosedWalletViewModel.cs
@@ -25,13 +25,13 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
await global.WalletManager.StartWalletAsync(Wallet);
}
- catch (Exception ex) when (ex is TaskCanceledException)
+ catch (TaskCanceledException ex) when (ex is TaskCanceledException || ex is OperationCanceledException)
{
Logger.LogTrace(ex);
}
catch (Exception ex)
{
- NotificationHelpers.Error($"Couldn't load wallet: {Title}. Reason: {ex.Message}");
+ NotificationHelpers.Error($"Couldn't load wallet: {Title}. Reason: {ex.ToUserFriendlyString()}");
Logger.LogError(ex);
}
}, this.WhenAnyValue(x => x.WalletState).Select(x => x == WalletState.Uninitialized));

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWallets/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWallets/LoadWalletViewModel.cs
@@ -205,16 +205,16 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.LoadWallets
Owner.OnClose();
}
}
- catch (Exception ex)
+ catch (TaskCanceledException ex) when (ex is TaskCanceledException || ex is OperationCanceledException)
{
- // Initialization failed.
- NotificationHelpers.Error(ex.ToUserFriendlyString());
- if (!(ex is OperationCanceledException))
+ Logger.LogTrace(ex);
+ }
+ catch (Exception ex)
{
+ NotificationHelpers.Error($"Couldn't load wallet: {Title}. Reason: {ex.ToUserFriendlyString()}");
Logger.LogError(ex);
}
}
- }
public void OpenWalletsFolder() => IoHelpers.OpenFolderInFileExplorer(Global.WalletManager.WalletDirectories.WalletsDir);

Improve wallet load ex