mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Engine: add error handling after run
This commit is contained in:
parent
52cd3ed731
commit
cdd360fc2c
@ -130,6 +130,12 @@ void PhreeqcEngine::Impl::run(double time_step) {
|
||||
const std::string runs_string =
|
||||
"RUN_CELLS\n -cells 1\n -time_step " + time_ss.str() + "\nEND\n";
|
||||
this->RunString(runs_string.c_str());
|
||||
|
||||
if (this->GetErrorStringLineCount() > 0) {
|
||||
std::cerr << ":: Error in Phreeqc script: " << this->GetErrorString()
|
||||
<< "\n";
|
||||
throw std::runtime_error("Phreeqc script error");
|
||||
}
|
||||
}
|
||||
|
||||
void PhreeqcEngine::Impl::init_wrappers(const InitCell &cell) {
|
||||
@ -242,4 +248,4 @@ void PhreeqcEngine::Impl::set_essential_values(const std::span<double> &data) {
|
||||
data.subspan(offset, this->surfaceWrapperPtr->size())};
|
||||
this->surfaceWrapperPtr->set(surf_span);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user