2024-07-20 11:51:52 +00:00
|
|
|
using FluentResults;
|
|
|
|
|
|
|
|
namespace PkmnLib.Static.Utils.Errors;
|
|
|
|
|
2024-07-20 14:12:39 +00:00
|
|
|
/// <summary>
|
|
|
|
/// A result that indicates an index is out of range.
|
|
|
|
/// </summary>
|
2024-07-20 11:51:52 +00:00
|
|
|
public class OutOfRange : Error
|
|
|
|
{
|
2024-07-20 14:12:39 +00:00
|
|
|
/// <inheritdoc cref="OutOfRange"/>
|
2024-07-20 11:51:52 +00:00
|
|
|
public OutOfRange(string hint, int index, int max)
|
|
|
|
: base($"{hint} index {index} is out of range. Must be between 0 and {max - 1}.")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|