From e6fc1b522fc20ade1b45e924bd89eba90b08a434 Mon Sep 17 00:00:00 2001 From: Alf Birger Rustad Date: Wed, 24 Feb 2021 22:08:13 +0100 Subject: [PATCH] Send message to DBG-file --- opm/common/utility/numeric/RootFinders.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/opm/common/utility/numeric/RootFinders.hpp b/opm/common/utility/numeric/RootFinders.hpp index f80d5c445..de6d2ab53 100644 --- a/opm/common/utility/numeric/RootFinders.hpp +++ b/opm/common/utility/numeric/RootFinders.hpp @@ -22,7 +22,9 @@ #define OPM_ROOTFINDERS_HEADER #include +#include +#include #include #include #include @@ -35,8 +37,11 @@ namespace Opm { static double handleBracketingFailure(const double x0, const double x1, const double f0, const double f1) { - OPM_THROW_NOLOG(std::runtime_error, "Error in parameters, zero not bracketed: [a, b] = [" - << x0 << ", " << x1 << "] f(a) = " << f0 << " f(b) = " << f1); + std::ostringstream sstr; + sstr << "Error in parameters, zero not bracketed: [a, b] = [" + << x0 << ", " << x1 << "] f(a) = " << f0 << " f(b) = " << f1); + OpmLog::debug(sstr.str()); + OPM_THROW_NOLOG(std::runtime_error, sstr.str()); return -1e100; // Never reached. } static double handleTooManyIterations(const double x0, const double x1, const int maxiter)