WellConvergence: avoid use of stringstream to format error messages

This commit is contained in:
Arne Morten Kvarving 2022-12-20 12:47:09 +01:00
parent 5c22d2f50c
commit 8d81588ea4

View File

@ -72,7 +72,9 @@ checkConvergenceControlEq(const WellState& well_state,
control_tolerance = tolerances.grup; control_tolerance = tolerances.grup;
break; break;
default: default:
OPM_DEFLOG_THROW(std::runtime_error, "Unknown well control control types for well " << well_.name(), deferred_logger); OPM_DEFLOG_THROW(std::runtime_error,
"Unknown well control control types for well " + well_.name(),
deferred_logger);
} }
} }
else if (well_.isProducer() ) else if (well_.isProducer() )
@ -101,7 +103,9 @@ checkConvergenceControlEq(const WellState& well_state,
control_tolerance = tolerances.grup; control_tolerance = tolerances.grup;
break; break;
default: default:
OPM_DEFLOG_THROW(std::runtime_error, "Unknown well control control types for well " << well_.name(), deferred_logger); OPM_DEFLOG_THROW(std::runtime_error,
"Unknown well control control types for well " + well_.name(),
deferred_logger);
} }
} }