From 9c5cadd1c0b8f802db1f54ba52c41582d5a4c614 Mon Sep 17 00:00:00 2001 From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:30:27 +0100 Subject: [PATCH] Moving the checkArgumentType error to its caller --- src/core/ActionWithArguments.cpp | 4 +++- src/tools/Keywords.cpp | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/ActionWithArguments.cpp b/src/core/ActionWithArguments.cpp index 71f2f1c019..b6bced55cd 100644 --- a/src/core/ActionWithArguments.cpp +++ b/src/core/ActionWithArguments.cpp @@ -192,7 +192,9 @@ void ActionWithArguments::interpretArgumentList(const std::vector& } } for(unsigned i=0; ikeywords.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() ); + } } } diff --git a/src/tools/Keywords.cpp b/src/tools/Keywords.cpp index ca9af95d6e..6efdbcd27a 100644 --- a/src/tools/Keywords.cpp +++ b/src/tools/Keywords.cpp @@ -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; }