From 6f5a662e2f5ba5dd67b5307a9cb85943db50016a Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Tue, 16 Jan 2024 12:50:20 +0300 Subject: [PATCH] feat: add exception --- Application/Common/Exceptions/RecordExistException.cs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Application/Common/Exceptions/RecordExistException.cs diff --git a/Application/Common/Exceptions/RecordExistException.cs b/Application/Common/Exceptions/RecordExistException.cs new file mode 100644 index 0000000..0344876 --- /dev/null +++ b/Application/Common/Exceptions/RecordExistException.cs @@ -0,0 +1,6 @@ +using System; +using System.Reflection; + +namespace Mirea.Api.DataAccess.Application.Common.Exceptions; + +public class RecordExistException(MemberInfo entity, string name, object id) : Exception($"Entity \"{entity.Name}\" with \"{name}\" already exist with id \"{id}\"."); \ No newline at end of file