Skip to content

Commit

Permalink
put parmparse enum error info in verbose checks
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Sep 4, 2024
1 parent 9e70570 commit 21c950a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions Src/Base/AMReX_ParmParse.H
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,10 @@ public:
try {
ref = amrex::getEnum<T>(s);
} catch (...) {
amrex::Print() << "amrex::ParmParse::query (input name: "
<< this->prefixedName(name) << "):\n";
if (amrex::Verbose() > 0 ) {
amrex::Print() << "amrex::ParmParse::query (input name: "
<< this->prefixedName(name) << "):\n";
}
throw;
}
}
Expand All @@ -1225,8 +1227,10 @@ public:
try {
ref = amrex::getEnum<T>(s);
} catch (...) {
amrex::Print() << "amrex::ParmParse::get (input name: "
<< this->prefixedName(name) << "):\n";
if (amrex::Verbose() > 0 ) {
amrex::Print() << "amrex::ParmParse::get (input name: "
<< this->prefixedName(name) << "):\n";
}
throw;
}
}
Expand All @@ -1247,8 +1251,10 @@ public:
try {
ref[i] = amrex::getEnum<T>(s[i]);
} catch (...) {
amrex::Print() << "amrex::ParmParse::queryarr (input name: "
<< this->prefixedName(name) << "):\n";
if (amrex::Verbose() > 0 ) {
amrex::Print() << "amrex::ParmParse::queryarr (input name: "
<< this->prefixedName(name) << "):\n";
}
throw;
}
}
Expand All @@ -1271,8 +1277,10 @@ public:
try {
ref[i] = amrex::getEnum<T>(s[i]);
} catch (...) {
amrex::Print() << "amrex::ParmParse::getarr (input name: "
<< this->prefixedName(name) << "):\n";
if (amrex::Verbose() > 0 ) {
amrex::Print() << "amrex::ParmParse::getarr (input name: "
<< this->prefixedName(name) << "):\n";
}
throw;
}
}
Expand Down

0 comments on commit 21c950a

Please sign in to comment.