diff --git a/src/libs/pestpp_common/EnsembleMethodUtils.cpp b/src/libs/pestpp_common/EnsembleMethodUtils.cpp index 3a9bbe7f..34cbe82c 100644 --- a/src/libs/pestpp_common/EnsembleMethodUtils.cpp +++ b/src/libs/pestpp_common/EnsembleMethodUtils.cpp @@ -3515,7 +3515,8 @@ void L2PhiHandler::report_group(bool echo) { { for (auto& oo : o.second) { - if (oo.second == 0.0) + //if (oo.second == 0.0) + if (snzgroups.find(oo.first) == snzgroups.end()) continue; len = max(len,(int)oo.first.size()); } diff --git a/src/libs/pestpp_common/Pest.cpp b/src/libs/pestpp_common/Pest.cpp index e63ab9f7..60859f96 100644 --- a/src/libs/pestpp_common/Pest.cpp +++ b/src/libs/pestpp_common/Pest.cpp @@ -968,6 +968,10 @@ int Pest::process_ctl_file(ifstream& fin, string _pst_filename) int Pest::process_ctl_file(ifstream& fin, string _pst_filename, ofstream& f_rec) { cout << "processing control file " << _pst_filename << endl; + if (!fin) + { + throw PestError("control file stream is not good"); + } string line; string line_upper; string section(""); diff --git a/src/programs/pestpp-ies/pestpp-ies.cpp b/src/programs/pestpp-ies/pestpp-ies.cpp index 64cbed8f..41257816 100644 --- a/src/programs/pestpp-ies/pestpp-ies.cpp +++ b/src/programs/pestpp-ies/pestpp-ies.cpp @@ -35,9 +35,9 @@ using namespace pest_utils; int main(int argc, char* argv[]) { -//#ifndef _DEBUG -// try { -//#endif +#ifndef _DEBUG + try { +#endif string version = PESTPP_VERSION; cout << endl << endl; cout << " pestpp-ies: a GLM iterative ensemble smoother" << endl << endl; @@ -302,20 +302,20 @@ int main(int argc, char* argv[]) fout_rec.close(); return 0; -//#ifndef _DEBUG -// } -// catch (exception &e) -// { -// cout << "Error condition prevents further execution: " << endl << e.what() << endl; -// //cout << "press enter to continue" << endl; -// //char buf[256]; -// //OperSys::gets_s(buf, sizeof(buf)); -// return 1; -// } -// catch (...) -// { -// cout << "Error condition prevents further execution" << endl; -// return 1; -// } -//#endif +#ifndef _DEBUG + } + catch (exception &e) + { + cout << "Error condition prevents further execution: " << endl << e.what() << endl; + //cout << "press enter to continue" << endl; + //char buf[256]; + //OperSys::gets_s(buf, sizeof(buf)); + return 1; + } + catch (...) + { + cout << "Error condition prevents further execution" << endl; + return 1; + } +#endif }