first commit
This commit is contained in:
27
MyNewProjectName.Domain/Exceptions/NotFoundException.cs
Normal file
27
MyNewProjectName.Domain/Exceptions/NotFoundException.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace MyNewProjectName.Domain.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Exception thrown when an entity is not found
|
||||
/// </summary>
|
||||
public class NotFoundException : DomainException
|
||||
{
|
||||
public NotFoundException()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public NotFoundException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public NotFoundException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
public NotFoundException(string name, object key)
|
||||
: base($"Entity \"{name}\" ({key}) was not found.")
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user