From 6f8969684bae3127ea1c6d9e010edabf30fcff1d Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 19 Dec 2024 16:34:03 +0100 Subject: [PATCH] comments --- src/solver/modeler/loadFiles/readLibraries.cpp | 1 + src/solver/modeler/loadFiles/readSystem.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/solver/modeler/loadFiles/readLibraries.cpp b/src/solver/modeler/loadFiles/readLibraries.cpp index ebccd6b90c..c824883271 100644 --- a/src/solver/modeler/loadFiles/readLibraries.cpp +++ b/src/solver/modeler/loadFiles/readLibraries.cpp @@ -35,6 +35,7 @@ static Study::SystemModel::Library loadSingleLibrary(const fs::path& filePath) const std::string libraryStr = IO::readFile(filePath); ModelParser::Parser parser; + // Add try/catch and error handling ModelParser::Library libraryObj = parser.parse(libraryStr); return ModelConverter::convert(libraryObj); } diff --git a/src/solver/modeler/loadFiles/readSystem.cpp b/src/solver/modeler/loadFiles/readSystem.cpp index f51f5d83d1..187213b917 100644 --- a/src/solver/modeler/loadFiles/readSystem.cpp +++ b/src/solver/modeler/loadFiles/readSystem.cpp @@ -35,6 +35,7 @@ Study::SystemModel::System loadSystem(const fs::path& studyPath, const std::string systemStr = IO::readFile(studyPath / "input" / "system.yml"); SystemParser::Parser parser; + // Add try/catch and error handling SystemParser::System systemObj = parser.parse(systemStr); return SystemConverter::convert(systemObj, libraries);