Skip to content

Commit

Permalink
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions engine/commands/model_list_cmd.cc
Original file line number Diff line number Diff line change
@@ -29,11 +29,19 @@ void ModelListCmd::Exec() {
for (const auto& model_entry : list_entry.value()) {
// auto model_entry = modellist_handler.GetModelInfo(model_handle);
try {
try {
yaml_handler.ModelConfigFromFile(
fmu::ToAbsoluteCortexDataPath(
fs::path(model_entry.path_to_model_yaml))
.string());
} catch (const std::exception& e) {
CTL_WRN("Fail to get model '" + model_entry.model +
"' information: " + std::string(e.what()));
yaml_handler.Reset();
continue;
}

count += 1;
yaml_handler.ModelConfigFromFile(
fmu::ToAbsoluteCortexDataPath(
fs::path(model_entry.path_to_model_yaml))
.string());
auto model_config = yaml_handler.GetModelConfig();
table.add_row({std::to_string(count), model_entry.model,
model_entry.model_alias, model_config.engine,

0 comments on commit e60a53c

Please sign in to comment.