feat: add a new exception
This commit is contained in:
parent
83f85ebb7b
commit
af7e370494
10
Application/Common/Exceptions/NotFoundException.cs
Normal file
10
Application/Common/Exceptions/NotFoundException.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Mirea.Api.DataAccess.Application.Common.Exceptions;
|
||||||
|
|
||||||
|
public class NotFoundException : Exception
|
||||||
|
{
|
||||||
|
public NotFoundException(MemberInfo entity, string name, object id) : base($"The entity \"{entity.Name}\" property \"{name}\" was not found by id \"{id}\".") { }
|
||||||
|
public NotFoundException(MemberInfo entity, object id) : base($"The entity \"{entity.Name}\" was not found by id \"{id}\".") { }
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user