18 lines
557 B
C#
18 lines
557 B
C#
namespace SIGCM2.Domain.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Thrown when moving a Rubro to one of its own descendants would create a cycle. → HTTP 400
|
|
/// </summary>
|
|
public sealed class RubroCycleDetectedException : DomainException
|
|
{
|
|
public int RubroId { get; }
|
|
public int NuevoParentId { get; }
|
|
|
|
public RubroCycleDetectedException(int rubroId, int nuevoParentId)
|
|
: base($"Mover el rubro '{rubroId}' al padre '{nuevoParentId}' crearía un ciclo en el árbol.")
|
|
{
|
|
RubroId = rubroId;
|
|
NuevoParentId = nuevoParentId;
|
|
}
|
|
}
|