diff --git a/ArmoredCar/ArmoredCar/MapsCollection.cs b/ArmoredCar/ArmoredCar/MapsCollection.cs index 368a85f..a16d389 100644 --- a/ArmoredCar/ArmoredCar/MapsCollection.cs +++ b/ArmoredCar/ArmoredCar/MapsCollection.cs @@ -118,9 +118,8 @@ namespace ArmoredCar { if (!File.Exists(filename)) { - throw new Exception("Файл не найден"); - } - string bufferTextFromFile = ""; + return false; + } using (StreamReader fs = new(filename)) { @@ -131,8 +130,7 @@ namespace ArmoredCar //очищаем записи _mapStorages.Clear(); while ((line = fs.ReadLine()) != null) - { - bufferTextFromFile += line; + { var elem = line.Split(separatorDict); AbstractMap map = null; switch (elem[1])