diff --git a/src/App.axaml.cs b/src/App.axaml.cs index c54b616d..6e45164d 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -78,7 +78,7 @@ namespace SourceGit return builder; } - private static void LogException(Exception ex) + public static void LogException(Exception ex) { if (ex == null) return; diff --git a/src/ViewModels/LauncherPage.cs b/src/ViewModels/LauncherPage.cs index b97ef6f7..3affe71d 100644 --- a/src/ViewModels/LauncherPage.cs +++ b/src/ViewModels/LauncherPage.cs @@ -100,23 +100,32 @@ namespace SourceGit.ViewModels public async void ProcessPopup() { - if (_popup is { InProgress: false }) + if (_popup is { InProgress: false } dump) { - if (!_popup.Check()) + if (!dump.Check()) return; - _popup.InProgress = true; - var task = _popup.Sure(); + dump.InProgress = true; + var task = dump.Sure(); + var finished = false; if (task != null) { - var finished = await task; - _popup.InProgress = false; + try + { + finished = await task; + } + catch (Exception e) + { + App.LogException(e); + } + + dump.InProgress = false; if (finished) Popup = null; } else { - _popup.InProgress = false; + dump.InProgress = false; Popup = null; } }