Skip to content

Commit

Permalink
Add warning logs for non-existent output variable (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes authored Sep 20, 2023
1 parent 2d5b705 commit 2b4f497
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libs/antares/study/parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,11 @@ static bool SGDIntLoadFamily_Playlist(Parameters& d,
}
return false;
}

static bool SGDIntLoadFamily_VariablesSelection(Parameters& d,
const String& key,
const String& value,
const String&)
const String& original)
{
if (key == "selected_vars_reset")
{
Expand All @@ -855,7 +856,10 @@ static bool SGDIntLoadFamily_VariablesSelection(Parameters& d,
{
// Check if the read output variable exists
if (not d.variablesPrintInfo.exists(value.to<std::string>()))
{
logs.warning() << "Output variable `" << original << "` does not exist";
return false;
}

bool is_var_printed = (key == "select_var +");
d.variablesPrintInfo.setPrintStatus(value.to<std::string>(), is_var_printed);
Expand Down

0 comments on commit 2b4f497

Please sign in to comment.