Fix
This commit is contained in:
parent
3e9def9597
commit
3de58e4df9
@ -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("Место указано неверно");
|
||||
|
Loading…
Reference in New Issue
Block a user