compareECL: use local sstream

This commit is contained in:
Arne Morten Kvarving
2023-01-02 15:54:24 +01:00
parent e0a8915a7b
commit 155ecf6b02

View File

@@ -21,6 +21,7 @@
#include <opm/common/ErrorMacros.hpp>
#include <iostream>
#include <sstream>
#include <string>
#include <getopt.h>
#include <fstream>
@@ -251,8 +252,12 @@ int main(int argc, char** argv) {
comparator.results_rft();
}
if (comparator.getNoErrors() > 0)
OPM_THROW(std::runtime_error, comparator.getNoErrors() << " errors encountered in comparisons.");
if (comparator.getNoErrors() > 0) {
std::ostringstream str;
str << comparator.getNoErrors()
<< " errors encountered in comparisons.";
OPM_THROW(std::runtime_error, str.str());
}
}
catch (const std::exception& e) {