Files
PIBD24_BoikoM.S._Candyhouse/CandyHouseSolution/CandyHouseContracts/Exceptions/ElementExistsException.cs
2025-04-14 22:07:51 +04:00

21 lines
552 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CandyHouseContracts.Exceptions;
public class ElementExistsException : Exception
{
public string ParamName { get; private set; }
public string ParamValue { get; private set; }
public ElementExistsException(string paramName, string paramValue) : base($"There is already an element with value{paramValue} of parameter {paramName}")
{
ParamName = paramName;
ParamValue = paramValue;
}
}