feat: update exception

This commit is contained in:
Polianin Nikita 2024-01-25 17:53:00 +03:00
parent 6fde0003e0
commit c82b29e90e

View File

@ -3,4 +3,8 @@ using System.Reflection;
namespace Mirea.Api.DataAccess.Application.Common.Exceptions; namespace Mirea.Api.DataAccess.Application.Common.Exceptions;
public class RecordExistException(MemberInfo entity, string name, object id) : Exception($"The entity \"{entity.Name}\" property \"{name}\" exists with id \"{id}\"."); public class RecordExistException : Exception
{
public RecordExistException(MemberInfo entity, string name, object id) : base($"The entity \"{entity.Name}\" property \"{name}\" exists with id \"{id}\".") { }
public RecordExistException(MemberInfo entity, object id) : base($"The entity \"{entity.Name}\" exists with id \"{id}\".") { }
}