diff --git a/AirBomber/AirBomber/SetAirBombersGeneric.cs b/AirBomber/AirBomber/SetAirBombersGeneric.cs index f5047e1..f494dd8 100644 --- a/AirBomber/AirBomber/SetAirBombersGeneric.cs +++ b/AirBomber/AirBomber/SetAirBombersGeneric.cs @@ -55,7 +55,10 @@ namespace AirBomber /// public int Insert(T airBomber, int position) { - if (position < 0 || position >= _maxCount) return -1; + if (position < 0 || position >= _maxCount) + { + throw new AirBomberNotFoundException(position); + } if (_places.Count + 1 >= _maxCount) { throw new StorageOverflowException(_maxCount);