Merge pull request #1043 from pgdr/remove-return-type-warn

Remove warnings (by throwing), added copyright header
This commit is contained in:
Atgeirr Flø Rasmussen 2016-06-20 22:34:40 +02:00 committed by GitHub
commit bdebcf48a3
2 changed files with 50 additions and 0 deletions

View File

@ -1,4 +1,26 @@
/*
Copyright 2012 Sintef.
Copyright 2016 Statoil.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
OPM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdexcept>
#include "config.h"
#include <opm/common/ErrorMacros.hpp>
#include <opm/core/wells/InjectionSpecification.hpp>
namespace Opm
@ -32,6 +54,7 @@ namespace Opm
case ControlMode::GRUP: return "GRUP";
case ControlMode::FLD : return "FLD" ;
}
OPM_THROW(std::domain_error, "Unknown control mode " << mode << " encountered in injection specification");
}
@ -43,6 +66,7 @@ namespace Opm
case InjectorType::OIL : return "OIL" ;
case InjectorType::GAS : return "GAS" ;
}
OPM_THROW(std::domain_error, "Unknown injector type " << type << " encountered in injection specification");
}
@ -53,5 +77,6 @@ namespace Opm
case GuideRateType::RAT : return "RAT" ;
case GuideRateType::NONE_GRT: return "NONE_GRT";
}
OPM_THROW(std::domain_error, "Unknown guide rate type " << type << " encountered in injection specification");
}
} // namespace Opm

View File

@ -1,4 +1,26 @@
/*
Copyright 2012 Sintef.
Copyright 2016 Statoil.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
OPM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdexcept>
#include "config.h"
#include <opm/common/ErrorMacros.hpp>
#include <opm/core/wells/ProductionSpecification.hpp>
namespace Opm
@ -37,6 +59,7 @@ namespace Opm
case ControlMode::GRUP: return "GRUP";
case ControlMode::FLD : return "FLD" ;
}
OPM_THROW(std::domain_error, "Unknown control mode " << mode << " encountered in production specification");
}
@ -48,6 +71,7 @@ namespace Opm
case Procedure::RATE : return "RATE" ;
case Procedure::WELL : return "WELL" ;
}
OPM_THROW(std::domain_error, "Unknown procedure " << type << " encountered in production specification");
}
@ -60,6 +84,7 @@ namespace Opm
case GuideRateType::WATER : return "WATER" ;
case GuideRateType::NONE_GRT: return "NONE_GRT";
}
OPM_THROW(std::domain_error, "Unknown guide rate type " << type << " encountered in production specification");
}