Replace THROW by OPM_THROW

This commit is contained in:
Andreas Lauser
2013-09-03 15:00:29 +02:00
parent 51cb4f2cb8
commit 8ee63106c5
13 changed files with 88 additions and 88 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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());