mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Replace THROW by OPM_THROW
This commit is contained in:
@@ -177,7 +177,7 @@ try
|
||||
create_directories(fpath);
|
||||
}
|
||||
catch (...) {
|
||||
THROW("Creating directories failed: " << fpath);
|
||||
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
||||
}
|
||||
std::string filename = output_dir + "/epoch_timing.param";
|
||||
epoch_os.open(filename.c_str(), std::fstream::trunc | std::fstream::out);
|
||||
@@ -230,7 +230,7 @@ try
|
||||
simtimer.init(*deck);
|
||||
} else {
|
||||
if (epoch != 0) {
|
||||
THROW("No TSTEP in deck for epoch " << epoch);
|
||||
OPM_THROW(std::runtime_error, "No TSTEP in deck for epoch " << epoch);
|
||||
}
|
||||
simtimer.init(param);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ try
|
||||
const std::string transport_solver_type
|
||||
= param.getDefault<std::string>("transport_solver_type", "ad");
|
||||
if (transport_solver_type == "implicit") {
|
||||
THROW("Cannot use implicit transport solver without UMFPACK. "
|
||||
OPM_THROW(std::runtime_error, "Cannot use implicit transport solver without UMFPACK. "
|
||||
"Either reconfigure opm-core with SuiteSparse/UMFPACK support and recompile, "
|
||||
"or use the reordering solver (transport_solver_type=reorder).");
|
||||
}
|
||||
@@ -196,7 +196,7 @@ try
|
||||
create_directories(fpath);
|
||||
}
|
||||
catch (...) {
|
||||
THROW("Creating directories failed: " << fpath);
|
||||
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
||||
}
|
||||
std::string filename = output_dir + "/epoch_timing.param";
|
||||
epoch_os.open(filename.c_str(), std::fstream::trunc | std::fstream::out);
|
||||
@@ -249,7 +249,7 @@ try
|
||||
simtimer.init(*deck);
|
||||
} else {
|
||||
if (epoch != 0) {
|
||||
THROW("No TSTEP in deck for epoch " << epoch);
|
||||
OPM_THROW(std::runtime_error, "No TSTEP in deck for epoch " << epoch);
|
||||
}
|
||||
simtimer.init(param);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ try
|
||||
create_directories(fpath);
|
||||
}
|
||||
catch (...) {
|
||||
THROW("Creating directories failed: " << fpath);
|
||||
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
||||
}
|
||||
std::string filename = output_dir + "/epoch_timing.param";
|
||||
epoch_os.open(filename.c_str(), std::fstream::trunc | std::fstream::out);
|
||||
@@ -246,7 +246,7 @@ try
|
||||
simtimer.init(*deck);
|
||||
} else {
|
||||
if (epoch != 0) {
|
||||
THROW("No TSTEP in deck for epoch " << epoch);
|
||||
OPM_THROW(std::runtime_error, "No TSTEP in deck for epoch " << epoch);
|
||||
}
|
||||
simtimer.init(param);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ try
|
||||
double oildistr[2] = { 0.0, 1.0 };
|
||||
ok = ok && append_well_controls(SURFACE_RATE, 1e-3, oildistr, 1, wells);
|
||||
if (!ok) {
|
||||
THROW("Something went wrong with well init.");
|
||||
OPM_THROW(std::runtime_error, "Something went wrong with well init.");
|
||||
}
|
||||
set_current_control(0, 0, wells);
|
||||
set_current_control(1, 0, wells);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace {
|
||||
double oildistr[2] = { 0.0, 1.0 };
|
||||
ok = ok && append_well_controls(SURFACE_RATE, 1e-3, oildistr, 1, wells.get());
|
||||
if (!ok) {
|
||||
THROW("Something went wrong with well init.");
|
||||
OPM_THROW(std::runtime_error, "Something went wrong with well init.");
|
||||
}
|
||||
set_current_control(0, 0, wells.get());
|
||||
set_current_control(1, 0, wells.get());
|
||||
|
||||
Reference in New Issue
Block a user