diff --git a/Rapr/DSEForm.cs b/Rapr/DSEForm.cs index cb7dd58..0d6742a 100644 --- a/Rapr/DSEForm.cs +++ b/Rapr/DSEForm.cs @@ -288,6 +288,7 @@ private async void ButtonEnumerate_Click(object sender, EventArgs e) await this.PopulateUIWithDriverStoreEntries().ConfigureAwait(true); } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "")] private async Task PopulateUIWithDriverStoreEntries() { try @@ -302,6 +303,10 @@ private async Task PopulateUIWithDriverStoreEntries() this.UpdateColumnSize(); this.ShowStatus(Status.Normal, Language.Status_Label); } + catch (Exception ex) + { + this.ShowStatus(Status.Error, ex.Message, ex.ToString(), true); + } finally { this.lstDriverStoreEntries.EmptyListMsg = Language.Message_No_Entries; @@ -370,6 +375,7 @@ private async Task DeleteDriverStoreEntries(List driverStoreEn } } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "")] private async Task DeleteDriverStorePackages(List driverStoreEntries) { StringBuilder details = new StringBuilder(); @@ -485,12 +491,17 @@ private async Task DeleteDriverStorePackages(List driverStoreE this.cbForceDeletion.Checked = false; } + catch (Exception ex) + { + this.ShowStatus(Status.Error, ex.Message, ex.ToString(), true); + } finally { this.EndOperation(); } } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "")] private async void ButtonAddDriver_Click(object sender, EventArgs e) { DialogResult dr = this.openFileDialog.ShowDialog(); @@ -528,6 +539,10 @@ private async void ButtonAddDriver_Click(object sender, EventArgs e) this.cbAddInstall.Checked = false; } + catch (Exception ex) + { + this.ShowStatus(Status.Error, ex.Message, ex.ToString(), true); + } finally { this.EndOperation();