Init
This commit is contained in:
19
Prefab.Catalog/Domain/Exceptions/DomainException.cs
Normal file
19
Prefab.Catalog/Domain/Exceptions/DomainException.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Prefab.Catalog.Domain.Exceptions;
|
||||
|
||||
public abstract class DomainException(string message) : Exception(message);
|
||||
|
||||
public sealed class CatalogNotFoundException(string resource, string identifier)
|
||||
: DomainException($"{resource} with identifier '{identifier}' was not found.")
|
||||
{
|
||||
public string Resource { get; } = resource;
|
||||
|
||||
public string Identifier { get; } = identifier;
|
||||
}
|
||||
|
||||
public sealed class CatalogConflictException(string resource, string identifier, string detail)
|
||||
: DomainException(detail)
|
||||
{
|
||||
public string Resource { get; } = resource;
|
||||
|
||||
public string Identifier { get; } = identifier;
|
||||
}
|
||||
Reference in New Issue
Block a user