mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Don't ignore unknown options, don't execute the command instead.
This commit is contained in:
@@ -896,7 +896,10 @@ namespace Stockfish::Tools
|
||||
params.ensure_quiet = true;
|
||||
}
|
||||
else
|
||||
cout << "ERROR: Ignoring unknown option " << token << endl;
|
||||
{
|
||||
cout << "ERROR: Unknown option " << token << ". Exiting...\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sfen_format.empty())
|
||||
|
||||
@@ -443,7 +443,10 @@ namespace Stockfish::Tools
|
||||
UCI::setoption("EnableTranspositionTable", "true");
|
||||
}
|
||||
else
|
||||
cout << "ERROR: Ignoring unknown option " << token << endl;
|
||||
{
|
||||
cout << "ERROR: Unknown option " << token << ". Exiting...\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sfen_format.empty())
|
||||
|
||||
@@ -210,6 +210,11 @@ namespace Stockfish::Tools
|
||||
is >> params.input_filename;
|
||||
else if (token == "output_file")
|
||||
is >> params.output_filename;
|
||||
else
|
||||
{
|
||||
std::cout << "ERROR: Unknown option " << token << ". Exiting...\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Performing transform nudged_static with parameters:\n";
|
||||
@@ -474,6 +479,11 @@ namespace Stockfish::Tools
|
||||
is >> params.keep_moves;
|
||||
else if (token == "research_count")
|
||||
is >> params.research_count;
|
||||
else
|
||||
{
|
||||
std::cout << "ERROR: Unknown option " << token << ". Exiting...\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
params.enforce_constraints();
|
||||
|
||||
Reference in New Issue
Block a user