45 LOG_TRACE_L1(
m_logger,
"Parsing simple reaction list file: {}", filename);
47 std::ifstream file(filename);
48 if (!file.is_open()) {
49 LOG_ERROR(
m_logger,
"Failed to open file: {}", filename);
51 throw std::runtime_error(
"Could not open file: " + filename);
56 while (std::getline(file, line)) {
57 LOG_TRACE_L3(
m_logger,
"Parsing reaction list file {}, line: {}", filename, line);
59 const size_t comment_pos = line.find(
'#');
60 if (comment_pos != std::string::npos) {
61 line = line.substr(0, comment_pos);
69 parsed.push_back(line);
71 LOG_TRACE_L1(
m_logger,
"Parsed {} reactions from file: {}", parsed.size(), filename);