Merge pull request #4511 from akva2/fix_rateconverter_exception

RateConverter: throw an exception, not a bare string
This commit is contained in:
Bård Skaflestad
2023-03-06 13:51:00 +01:00
committed by GitHub
+2 -2
View File
@@ -330,7 +330,7 @@ namespace Opm {
// not both
if (detR != 1 && detRw != 1) {
std::string msg = "only support " + std::to_string(detR) + " " + std::to_string(detR);
throw(msg);
throw std::range_error(msg);
}
if (RegionAttributeHelpers::PhaseUsed::oil(pu)) {
@@ -538,7 +538,7 @@ namespace Opm {
// or gas in oil
if (detR != 1 && detRw != 1) {
std::string msg = "only support " + std::to_string(detR) + " " + std::to_string(detR);
throw(msg);
throw std::range_error(msg);
}
if (RegionAttributeHelpers::PhaseUsed::gas(pu)) {
// q[g]_r = 1/(bg * (1 - rs*rv)) * (q[g]_s - rs*q[o]_s)