From 0851574316f756c4003d00c344602b381aa1bbbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=8F=D1=80=20=D0=90=D0=B3=D0=BB?= =?UTF-8?q?=D0=B8=D1=83=D0=BB=D0=BB=D0=BE=D0=B2?= Date: Sat, 29 Oct 2022 00:52:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=20=D0=BB?= =?UTF-8?q?=D0=BE=D0=B3=D0=B3=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/AirBomber.csproj | 10 ++++++++++ AirBomber/AirBomber/SetAirplanesGeneric.cs | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/AirBomber/AirBomber/AirBomber.csproj b/AirBomber/AirBomber/AirBomber.csproj index 0aab207..d20b0b6 100644 --- a/AirBomber/AirBomber/AirBomber.csproj +++ b/AirBomber/AirBomber/AirBomber.csproj @@ -8,6 +8,16 @@ enable + + + + + + + Always + + + diff --git a/AirBomber/AirBomber/SetAirplanesGeneric.cs b/AirBomber/AirBomber/SetAirplanesGeneric.cs index 690dbf2..986ccf7 100644 --- a/AirBomber/AirBomber/SetAirplanesGeneric.cs +++ b/AirBomber/AirBomber/SetAirplanesGeneric.cs @@ -55,7 +55,7 @@ namespace AirBomber public int Insert(T airplane, int position) { if (Count == _maxcount) - throw new StorageOverflowException(); + throw new StorageOverflowException(_maxcount); if (!isCorrectPosition(position)) { return -1; @@ -74,7 +74,7 @@ namespace AirBomber return null; var result = this[position]; if (result == null) - throw new AirplaneNotFoundException(); + throw new AirplaneNotFoundException(position); _places.RemoveAt(position); return result; }