From 3de58e4df9ed97f2f93d41356a9067324a200a55 Mon Sep 17 00:00:00 2001 From: shadowik Date: Sun, 11 Dec 2022 22:58:41 +0400 Subject: [PATCH] Fix --- DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs b/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs index d934c26..a0a4123 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/SetBusesGeneric.cs @@ -29,20 +29,6 @@ namespace DoubleDeckerBus 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) { throw new BusNotFoundException("Место указано неверно");