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}");