Skip to content

Commit

Permalink
keep message str while ptr is being used
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Sep 18, 2024
1 parent 3c5609c commit 088a111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pybamm/solvers/c_solvers/idaklu/IDAKLUSolverOpenMP.inl
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ void IDAKLUSolverOpenMP<ExprSet>::SetStepOutputSensitivities(
template <class ExprSet>
void IDAKLUSolverOpenMP<ExprSet>::CheckErrors(int const & flag) {
if (flag < 0) {
auto message = (std::string("IDA failed with flag ") + std::to_string(flag)).c_str();
throw std::runtime_error(message);
auto message = std::string("IDA failed with flag ") + std::to_string(flag);
throw std::runtime_error(message.c_str());
}
}

Expand Down

0 comments on commit 088a111

Please sign in to comment.