PkmnLib.NET/PkmnLib.Static/Utils/Errors/OutOfRange.cs

14 lines
387 B
C#

namespace PkmnLib.Static.Utils.Errors;
/// <summary>
/// A result that indicates an index is out of range.
/// </summary>
public class OutOfRangeException : Exception
{
/// <inheritdoc cref="OutOfRangeException"/>
public OutOfRangeException(string hint, int index, int max)
: base($"{hint} index {index} is out of range. Must be between 0 and {max - 1}.")
{
}
}