laba7 Кувшинов Тимур ПИбд-21 простая #11
@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace Laba1Loco
|
||||
@ -89,9 +90,13 @@ namespace Laba1Loco
|
||||
DrawingTrain train = elem?.CreateDrawingTrain(_separatorForObject, _pictureWidth, _pictureHeight);
|
||||
if (train != null)
|
||||
{
|
||||
if (collection + train == -1)
|
||||
try
|
||||
{
|
||||
throw new Exception("Ошибка добавления в коллекцию");
|
||||
int t = collection + train;
|
||||
}
|
||||
catch (ApplicationException ex)
|
||||
{
|
||||
throw new Exception($"Ошибка добавления в коллекцию: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user