16 lines
367 B
C#
16 lines
367 B
C#
|
|
namespace SIGCM2.Domain.Exceptions;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Thrown when a requested Product does not exist. → HTTP 404
|
||
|
|
/// </summary>
|
||
|
|
public sealed class ProductNotFoundException : DomainException
|
||
|
|
{
|
||
|
|
public int ProductId { get; }
|
||
|
|
|
||
|
|
public ProductNotFoundException(int id)
|
||
|
|
: base($"El producto con id={id} no existe.")
|
||
|
|
{
|
||
|
|
ProductId = id;
|
||
|
|
}
|
||
|
|
}
|