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; }