This commit is contained in:
shadowik 2022-12-11 22:58:41 +04:00
parent 3e9def9597
commit 3de58e4df9

View File

@ -29,20 +29,6 @@ namespace DoubleDeckerBus
public int Insert(T bus, int position) public int Insert(T bus, int position)
{ {
try
{
if (bus.getBus() == null)
{
throw new NullReferenceException();
}
}
catch (NullReferenceException) {
MessageBox.Show("null");
}
if (BusyPlaces == _maxCount) {
throw new StorageOverflowException(BusyPlaces);
}
if (position < 0 || position >= _maxCount) if (position < 0 || position >= _maxCount)
{ {
throw new BusNotFoundException("Место указано неверно"); throw new BusNotFoundException("Место указано неверно");