Add missing try-catch
This commit is contained in:
@ -506,9 +506,9 @@ void AngleTable::param_extract(Table *tb, char *line)
|
||||
tb->fpflag = 0;
|
||||
tb->theta0 = MY_PI;
|
||||
|
||||
try {
|
||||
ValueTokenizer values(line);
|
||||
|
||||
try {
|
||||
while (values.has_next()) {
|
||||
std::string word = values.next_string();
|
||||
|
||||
|
||||
@ -476,7 +476,9 @@ void BondTable::param_extract(Table *tb, char *line)
|
||||
tb->fpflag = 0;
|
||||
tb->r0 = 0.0;
|
||||
|
||||
try {
|
||||
ValueTokenizer values(line);
|
||||
|
||||
while (values.has_next()) {
|
||||
std::string word = values.next_string();
|
||||
|
||||
@ -492,6 +494,9 @@ void BondTable::param_extract(Table *tb, char *line)
|
||||
error->one(FLERR,"Invalid keyword in bond table parameters");
|
||||
}
|
||||
}
|
||||
} catch(TokenizerException & e) {
|
||||
error->one(FLERR, e.what());
|
||||
}
|
||||
|
||||
if (tb->ninput == 0) error->one(FLERR,"Bond table parameters did not set N");
|
||||
}
|
||||
|
||||
@ -557,6 +557,7 @@ void PairTable::param_extract(Table *tb, char *line)
|
||||
tb->rflag = NONE;
|
||||
tb->fpflag = 0;
|
||||
|
||||
try {
|
||||
ValueTokenizer values(line);
|
||||
|
||||
while (values.has_next()) {
|
||||
@ -577,6 +578,9 @@ void PairTable::param_extract(Table *tb, char *line)
|
||||
error->one(FLERR,fmt::format("Invalid keyword {} in pair table parameters", word).c_str());
|
||||
}
|
||||
}
|
||||
} catch (TokenizerException & e) {
|
||||
error->one(FLERR, e.what());
|
||||
}
|
||||
|
||||
if (tb->ninput == 0) error->one(FLERR,"Pair table parameters did not set N");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user