private void UpdateJob(object DoValidate) { try { SteamDownloader.Update((bool)DoValidate); } catch (Exception Exception) { SteamDownloader.ReleaseLock(); if (Exception is AggregateException) { Exception = Exception.InnerException; } if (Exception is ValidatorException) { Dispatcher.Invoke(() => { SetStatus(string.Format(LocString(LocCode.ValidatorExc), Exception.Message), DarkRed); FinishHandler(); }); } else { File.WriteAllText($@"{AppDataFolder}\LastCrash.txt", $"{Exception.Message}\n{Exception.StackTrace}"); Dispatcher.Invoke(() => { new CrashWindow(Exception).ShowDialog(); Current.Shutdown(); }); } return; } }