namespace SIGCM2.Domain.Exceptions;

/// <summary>
/// Thrown when creating or moving a Rubro would exceed the configured maximum tree depth. → HTTP 422
/// </summary>
public sealed class RubroMaxDepthExceededException : DomainException
{
    public int Intentada { get; }
    public int Max { get; }

    public RubroMaxDepthExceededException(int intentada, int max)
        : base($"La profundidad intentada ({intentada}) excede el máximo permitido ({max}).")
    {
        Intentada = intentada;
        Max = max;
    }
}
