WellInterface: use {fmt} to format error messages

This commit is contained in:
Arne Morten Kvarving 2022-12-20 12:49:59 +01:00
parent a25479e5c2
commit a020a993b5

View File

@ -29,6 +29,8 @@
#include <dune/common/version.hh> #include <dune/common/version.hh>
#include <fmt/format.h>
namespace Opm namespace Opm
{ {
@ -941,7 +943,9 @@ namespace Opm
} }
case Well::ProducerCMode::CRAT: case Well::ProducerCMode::CRAT:
{ {
OPM_DEFLOG_THROW(std::runtime_error, "CRAT control not supported " << this->name(), deferred_logger); OPM_DEFLOG_THROW(std::runtime_error,
fmt::format("CRAT control not supported, well {}", this->name()),
deferred_logger);
} }
case Well::ProducerCMode::RESV: case Well::ProducerCMode::RESV:
{ {