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);