Skip to content

Commit

Permalink
Moving the checkArgumentType error to its caller
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed Dec 18, 2024
1 parent 3cc05d9 commit 9c5cadd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core/ActionWithArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ void ActionWithArguments::interpretArgumentList(const std::vector<std::string>&
}
}
for(unsigned i=0; i<arg.size(); ++i) {
if( !readact->keywords.checkArgumentType( arg[i]->getRank(), arg[i]->hasDerivatives() ) ) readact->warning("documentation for input type is not provided in " + readact->getName() );
if( !readact->keywords.checkArgumentType( arg[i]->getRank(), arg[i]->hasDerivatives() ) ) {
readact->error("documentation for input type is not provided in " + readact->getName() );
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/tools/Keywords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ bool Keywords::checkArgumentType( const std::size_t& rank, const bool& hasderiv
if( rank==1 && x.second.find("vector")!=std::string::npos ) return true;
if( rank==2 && x.second.find("matrix")!=std::string::npos ) return true;
}
plumed_merror("WARNING: type for input argument has not been specified");
return false;
}

Expand Down

0 comments on commit 9c5cadd

Please sign in to comment.