From f705ead5c2cda695d37292ef2fbeeac4dc724484 Mon Sep 17 00:00:00 2001 From: Adelina888 Date: Fri, 17 May 2024 18:49:09 +0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BA=D0=BE=D0=BD=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= =?UTF-8?q?=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectStormtrooper/FormStormtrooperCollection.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ProjectStormtrooper/FormStormtrooperCollection.cs b/ProjectStormtrooper/FormStormtrooperCollection.cs index c7a2016..1aa7cf7 100644 --- a/ProjectStormtrooper/FormStormtrooperCollection.cs +++ b/ProjectStormtrooper/FormStormtrooperCollection.cs @@ -91,6 +91,11 @@ public partial class FormStormtrooperCollection : Form MessageBox.Show("Не удалось добавить объект"); _logger.LogError("Ошибка: {Message}", ex.Message); } + catch(ObjectIsEqualException ex) + { + MessageBox.Show("Такой объект уже существует "); + _logger.LogError("Ошибка: {Message}", ex.Message); + } } ///