Be more explicit on invalid attempt count failure

This commit is contained in:
Matt Nadareski
2026-02-28 16:27:28 -05:00
parent 469a3886fb
commit 1afa77d6eb

View File

@@ -226,7 +226,10 @@ namespace SabreTools.RedumpLib.Web
{
// Only retry a positive number of times
if (AttemptCount <= 0)
{
Console.Error.WriteLine("Invalid number of attempts provided, must be at least 1");
return null;
}
for (int i = 0; i < AttemptCount; i++)
{
@@ -261,7 +264,10 @@ namespace SabreTools.RedumpLib.Web
{
// Only retry a positive number of times
if (AttemptCount <= 0)
{
Console.Error.WriteLine("Invalid number of attempts provided, must be at least 1");
return null;
}
for (int i = 0; i < AttemptCount; i++)
{
@@ -317,7 +323,10 @@ namespace SabreTools.RedumpLib.Web
{
// Only retry a positive number of times
if (AttemptCount <= 0)
{
Console.Error.WriteLine("Invalid number of attempts provided, must be at least 1");
return null;
}
for (int i = 0; i < AttemptCount; i++)
{