mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #4342 from bska/accurate-error-for-missing-pvt-interp
PVT Interpolants: Give More Meaningful Diagnostic if PVT Interpolant Missing
This commit is contained in:
commit
7097d16b15
@ -496,6 +496,13 @@ void
|
||||
Opm::ECLPVT::Gas::Impl::validateRegIdx(const RegIdx region) const
|
||||
{
|
||||
if (region >= this->eval_.size()) {
|
||||
if (this->eval_.empty()) {
|
||||
throw std::invalid_argument{
|
||||
"No Gas PVT Interpolant Available in Region "
|
||||
+ std::to_string(region + 1)
|
||||
};
|
||||
}
|
||||
|
||||
throw std::invalid_argument {
|
||||
"Region Index " +
|
||||
std::to_string(region) +
|
||||
|
@ -691,6 +691,13 @@ void
|
||||
Opm::ECLPVT::Oil::Impl::validateRegIdx(const RegIdx region) const
|
||||
{
|
||||
if (region >= this->eval_.size()) {
|
||||
if (this->eval_.empty()) {
|
||||
throw std::invalid_argument {
|
||||
"No Oil PVT Interpolant Available in Region "
|
||||
+ std::to_string(region + 1)
|
||||
};
|
||||
}
|
||||
|
||||
throw std::invalid_argument {
|
||||
"Region Index " +
|
||||
std::to_string(region) +
|
||||
|
@ -252,6 +252,13 @@ void
|
||||
Opm::ECLPVT::Water::Impl::validateRegIdx(const RegIdx region) const
|
||||
{
|
||||
if (region >= this->eval_.size()) {
|
||||
if (this->eval_.empty()) {
|
||||
throw std::invalid_argument {
|
||||
"No Water PVT Interpolant Available in Region "
|
||||
+ std::to_string(region + 1)
|
||||
};
|
||||
}
|
||||
|
||||
throw std::invalid_argument {
|
||||
"Region Index " +
|
||||
std::to_string(region) +
|
||||
|
Loading…
Reference in New Issue
Block a user