laba7 Кувшинов Тимур ПИбд-21 простая #11

Closed
TImourka wants to merge 6 commits from laba7 into laba6
Showing only changes of commit 25dd933b17 - Show all commits

View File

@ -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}");
}
}
}