diff --git a/AsbCloudInfrastructure/Services/WellService.cs b/AsbCloudInfrastructure/Services/WellService.cs index e09263c1..5da5027a 100644 --- a/AsbCloudInfrastructure/Services/WellService.cs +++ b/AsbCloudInfrastructure/Services/WellService.cs @@ -47,17 +47,17 @@ namespace AsbCloudInfrastructure.Services CancellationToken token = default) { if (dto.IdWellType is < 1 or > 2) - throw new ArgumentException("Тип секции указан неправильно."); + throw new ArgumentException("Тип секции указан неправильно.", nameof(dto)); if (dto.State is < 0 or > 2) throw new ArgumentException("Текущее состояние работы скважины" + - "указано неправильно."); + "указано неправильно.", nameof(dto)); var well = await db.Wells .FirstOrDefaultAsync(w => w.Id == idWell, token) .ConfigureAwait(false); if (well is null) - return null; + throw new ArgumentException("Тип секции указан неправильно.", nameof(idWell)); well.Caption = dto.Caption; well.Latitude = dto.Latitude;