From: Timo Heister Date: Sat, 20 Jun 2015 09:31:43 +0000 (-0400) Subject: fail if invalid content after "end" in prm X-Git-Tag: v8.3.0-rc1~101^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89bb665d75e908d6abaa29c44049ca9256ff1ccf;p=dealii.git fail if invalid content after "end" in prm Instead of ignoring all content after "end" in a prm file, generate a parser error. --- diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index fa519d059d..d25b6f92a5 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -2574,6 +2574,18 @@ ParameterHandler::scan_line (std::string line, if ((line.find ("END") == 0) || (line.find ("end") == 0)) { + line.erase (0, 3); + while ((line.size() > 0) && (line[0] == ' ')) + line.erase (0, 1); + + if (line.size()>0) + { + std::cerr << "Line <" << lineno + << "> of file <" << input_filename + << ">: invalid content after 'end'!" << std::endl; + return false; + } + if (subsection_path.size() == 0) { std::cerr << "Line <" << lineno