From 4cc1f29e3e8c3553209d5318e5ec4ee67cc8f414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=91=D0=B5=D0=BB?= =?UTF-8?q?=D1=8F=D0=BD=D0=B8=D0=BD?= Date: Mon, 18 Dec 2023 01:21:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tank/src/TanksGenericStorage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tank/src/TanksGenericStorage.java b/Tank/src/TanksGenericStorage.java index 4f9eeaf..6b788a5 100644 --- a/Tank/src/TanksGenericStorage.java +++ b/Tank/src/TanksGenericStorage.java @@ -29,14 +29,14 @@ public class TanksGenericStorage { data.append(key).append("\n"); for (DrawingArmoVehicle elem: _tankStorages.get(key).getTanks(100)) { if(_tankStorages.get(key) == null) - throw new InvalidPropertiesFormatException(""); + throw new InvalidPropertiesFormatException("Ключ не найден. Сохранение невозможно"); if(_tankStorages.get(key) != null) data.append(elem != null ? ExtentionDrawingTank.GetDataForSave(elem, _separatorForObjectWR) + "\n" : ""); } if(data.length() == 0) - throw new InvalidStreamException("File not found, нет данных для сохранения"); + throw new InvalidStreamException("Нет данных для сохранения"); try (BufferedWriter writer = new BufferedWriter(new FileWriter(filename))) { writer.write("TankStorageSingle" + System.lineSeparator() + data.toString()); @@ -110,7 +110,7 @@ public class TanksGenericStorage { } if (data.length() == 0) - throw new InvalidStreamException("File not found, нет данных для сохранения"); + throw new InvalidStreamException("Нет данных для сохранения"); try (BufferedWriter writer = new BufferedWriter(new FileWriter(filename))) { writer.write("TankStorage" + System.lineSeparator() + data.toString());