From a053dafaeae7ccb5653343ae172e40f689b2e364 Mon Sep 17 00:00:00 2001 From: artur-kalimullin <144933634+artur-kalimullin@users.noreply.github.com> Date: Sat, 25 May 2024 00:18:24 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/StorageCollection.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/StorageCollection.cs b/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/StorageCollection.cs index 7439aa5..6a92a15 100644 --- a/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/StorageCollection.cs +++ b/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/StorageCollection.cs @@ -147,7 +147,7 @@ public class StorageCollection { if (!File.Exists(filename)) { - throw new FileNotFoundException("Файл не существует"); + throw new FileNotFoundException($"{filename} не существует"); } using (StreamReader fs = File.OpenText(filename)) @@ -155,11 +155,11 @@ public class StorageCollection string str = fs.ReadLine(); if (str == null || str.Length == 0) { - throw new ArgumentException("В файле нет данных"); + throw new FileFormatException("Файл не подходит"); } if (!str.StartsWith(_collectionKey)) { - throw new InvalidDataException("В файле неверные данные"); + throw new IOException("В файле неверные данные"); } _storages.Clear(); string strs = "";