diff --git a/src/BreCalClient/ShipListDialog.xaml.cs b/src/BreCalClient/ShipListDialog.xaml.cs index a4149e2..7ad18ed 100644 --- a/src/BreCalClient/ShipListDialog.xaml.cs +++ b/src/BreCalClient/ShipListDialog.xaml.cs @@ -49,8 +49,15 @@ namespace BreCalClient { if (!shipmodel.Ship.Deleted) { - if (this.ShipApi != null) - await this.ShipApi.ShipDeleteAsync(shipmodel.Ship.Id); + try + { + if (this.ShipApi != null) + await this.ShipApi.ShipDeleteAsync(shipmodel.Ship.Id); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); + } BreCalLists.Ships.Remove(shipmodel); // remove from "selectable" ships shipmodel.Ship.Deleted = true; // set deleted marker on working instance this.dataGridShips.ItemsSource = null;