From 056ba66e58dc62d1999e3227ed2751de5021b5a9 Mon Sep 17 00:00:00 2001
From: Andreas Naumann <andreas.naumann@tu-dresden.de>
Date: Mon, 18 Jan 2016 12:19:03 +0000
Subject: [PATCH] Initfile throws error with break on missing tag and
 debuglevel greater than 2

---
 AMDiS/src/Initfile.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/AMDiS/src/Initfile.h b/AMDiS/src/Initfile.h
index 46923780..57e406f6 100644
--- a/AMDiS/src/Initfile.h
+++ b/AMDiS/src/Initfile.h
@@ -444,20 +444,18 @@ namespace AMDiS {
 	valStr = trim(valStr);
 	detail::convert(valStr, value);
       } 
-      } catch(mu::ParserError& e) {
-	std::string parser_error = "Could not parse: " + tag;
-	throw std::runtime_error(parser_error);
-      }
-      /*
-else if(error_code == TAG_NOT_FOUND_BREAK)
+      else if(error_code == TAG_NOT_FOUND_BREAK)
 	throw TagNotFoundBreak("required tag '" + tag + "' not found");
       else if (error_code == TAG_NOT_FOUND) {
 	if (debugInfo == 2)
 	  std::cout << "there is no tag '" + tag + "'" << std::endl;
       } else
 	throw std::runtime_error("unknown error_code (" + boost::lexical_cast<std::string>(error_code) + ") returned for tag '" + tag + "'");
-      */
 
+      } catch(mu::ParserError& e) {
+	std::string parser_error = "Could not parse: " + tag;
+	throw std::runtime_error(parser_error);
+      }
       if (debugInfo == 2) {
 	std::cout << "Parameter '" << tag << "'"
 		  << " initialized with: " << value << std::endl;
-- 
GitLab