fix: throw error when number of headings is not equal to parsed values

This commit is contained in:
Max Lübke 2025-08-01 11:13:48 +02:00
parent f3444ab2fa
commit e1ee3f801a

View File

@ -15,6 +15,11 @@ PhreeqcSelectedOutputParser::PhreeqcSelectedOutputParser(
if (this->_m_has_selected_output) {
parseHeader();
if (this->_m_headings.size() != this->getValues(1).size()) {
throw std::runtime_error(
"Number of headings does not match number of values in selected "
"output.");
}
}
}