mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
PhreeqcMatrix constructor: add error check after reading script
This commit is contained in:
parent
979cc7dec0
commit
52cd3ed731
@ -18,6 +18,12 @@ PhreeqcMatrix::PhreeqcMatrix(const std::string &database,
|
||||
this->_m_pqc->LoadDatabaseString(database.c_str());
|
||||
this->_m_pqc->RunString(input_script.c_str());
|
||||
|
||||
if (this->_m_pqc->GetErrorStringLineCount() > 0) {
|
||||
std::cerr << ":: Error in Phreeqc script: "
|
||||
<< this->_m_pqc->GetErrorString() << "\n";
|
||||
throw std::runtime_error("Phreeqc script error");
|
||||
}
|
||||
|
||||
this->_m_knobs =
|
||||
std::make_shared<PhreeqcKnobs>(this->_m_pqc.get()->GetPhreeqcPtr());
|
||||
|
||||
@ -52,4 +58,4 @@ PhreeqcMatrix::PhreeqcMatrix(const std::string &database,
|
||||
// _m_database = other._m_database;
|
||||
|
||||
// return *this;
|
||||
// }
|
||||
// }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user