Abazov A. A. LabWork07 #7

Closed
Andrey_Abazov wants to merge 3 commits from LabWork07 into LabWork06
Showing only changes of commit ddb2f99e7a - Show all commits

View File

@ -55,7 +55,10 @@ namespace AirBomber
/// <returns></returns>
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);