From 2330ac9aed0b8637b2c4bcf695449ccdcdbe398b Mon Sep 17 00:00:00 2001 From: Danil Malin Date: Mon, 5 Dec 2022 20:47:44 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B8=20=D1=83=D0=B6=D0=B5=20=D1=81=D1=83=D1=89=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B5=D0=B3=D0=BE=20=D0=BE?= =?UTF-8?q?=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarmlyLocomotive/FormMapWithSetLocomotives.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs b/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs index e15663d..1a13137 100644 --- a/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs +++ b/WarmlyLocomotive/WarmlyLocomotive/FormMapWithSetLocomotives.cs @@ -102,6 +102,11 @@ namespace WarmlyLocomotive _logger.LogWarning($"Ошибка переполнения хранилища: {ex.Message}"); MessageBox.Show($"Ошибка переполнения хранилища: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error); } + catch(ArgumentException ex) + { + _logger.LogWarning($"Ошибка при добавлении: {ex.Message}"); + MessageBox.Show($"Ошибка при добавлении: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error); + } catch (Exception ex) { _logger.LogWarning($"Неизвестная ошибка: {ex.Message}");