From c82b29e90e5b85a79fdd073cb7cab38bd04eba34 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Thu, 25 Jan 2024 17:53:00 +0300 Subject: [PATCH] feat: update exception --- Application/Common/Exceptions/RecordExistException.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Application/Common/Exceptions/RecordExistException.cs b/Application/Common/Exceptions/RecordExistException.cs index 41f64be..c7d03b3 100644 --- a/Application/Common/Exceptions/RecordExistException.cs +++ b/Application/Common/Exceptions/RecordExistException.cs @@ -3,4 +3,8 @@ using System.Reflection; 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}\"."); \ No newline at end of file +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}\".") { } +} \ No newline at end of file