From e323494842c8a1154abc0a0a8e71515ba77343c3 Mon Sep 17 00:00:00 2001 From: bocchanskyy Date: Mon, 25 Dec 2023 01:18:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D1=83?= =?UTF-8?q?=D1=8E=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bulldozer/Bulldozer/Generics/BulldozersGenericStorage.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Bulldozer/Bulldozer/Generics/BulldozersGenericStorage.cs b/Bulldozer/Bulldozer/Generics/BulldozersGenericStorage.cs index 2d2620e..ca6c63b 100644 --- a/Bulldozer/Bulldozer/Generics/BulldozersGenericStorage.cs +++ b/Bulldozer/Bulldozer/Generics/BulldozersGenericStorage.cs @@ -147,11 +147,11 @@ namespace Bulldozer.Generics var strs = str.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); if (strs == null || strs.Length == 0) { - return false; + throw new IOException("Нет данных для загрузки"); } if (!strs[0].StartsWith("BulldozerStorage")) { - return false; + throw new IOException("Неверный формат данных"); } _bulldozerStorages.Clear(); do @@ -172,7 +172,7 @@ namespace Bulldozer.Generics { if ((collection + bulldozer) == -1) { - return false; + throw new IOException("Ошибка добавления в коллекцию"); } } } @@ -180,9 +180,10 @@ namespace Bulldozer.Generics str = sr.ReadLine(); } while (str != null); + } + _bulldozerStorages.Add(record[0], collection); } return true; } } } -