Meaningful names in error message when PQC fails

This commit is contained in:
Marco De Lucia 2025-12-01 16:11:21 +01:00
parent 86fddb50f9
commit d0e1560360
2 changed files with 4 additions and 4 deletions

View File

@ -145,9 +145,9 @@ void PhreeqcEngine::Impl::run(double time_step) {
this->RunString(runs_string.c_str());
if (this->GetErrorStringLineCount() > 0) {
std::cerr << ":: Error in Phreeqc script: " << this->GetErrorString()
std::cerr << ":: PhreeqcEngine::Impl::run: Error in Phreeqc script: " << this->GetErrorString()
<< "\n";
throw std::runtime_error("Phreeqc script error");
throw std::runtime_error(":: PhreeqcEngine::Impl::run: Phreeqc script error");
}
}

View File

@ -32,9 +32,9 @@ PhreeqcMatrix::PhreeqcMatrix(const std::string &database,
this->_m_pqc->RunString(input_script.c_str());
if (this->_m_pqc->GetErrorStringLineCount() > 0) {
std::cerr << ":: Error in Phreeqc script: "
std::cerr << ":: PhreeqcMatrix::PhreeqcMatrix: Error in Phreeqc script: "
<< this->_m_pqc->GetErrorString() << "\n";
throw std::runtime_error("Phreeqc script error");
throw std::runtime_error(":: PhreeqcMatrix::PhreeqcMatrix: Phreeqc script error");
}
this->_m_knobs =