From 740de5601acf2ec55a0d10cc75e5c712ea771d6a Mon Sep 17 00:00:00 2001
From: Mohcine Chraibi <m.chraibi@fz-juelich.de>
Date: Sun, 17 Mar 2019 14:08:30 +0100
Subject: [PATCH] Return error if parsing sources is unsuccessful

---
 IO/PedDistributionParser.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/IO/PedDistributionParser.cpp b/IO/PedDistributionParser.cpp
index 1cc30b69..e78775f1 100644
--- a/IO/PedDistributionParser.cpp
+++ b/IO/PedDistributionParser.cpp
@@ -180,22 +180,22 @@ bool PedDistributionParser::LoadPedDistribution(vector<std::shared_ptr<StartDist
              if (!docSource.LoadFile()) {
                Log->Write("ERROR: \t%s", docSource.ErrorDesc());
                Log->Write("ERROR: \t could not parse the sources file.");
-               //return false;
+               return false;
              }
              TiXmlElement* xRootNodeSource = docSource.RootElement();
              if (!xRootNodeSource) {
                   Log->Write("ERROR:\tRoot element does not exist in source file.");
-                  //return false;
+                  return false;
              }
 
              if (xRootNodeSource->ValueStr() != "JPScore") {
                   Log->Write("ERROR:\tRoot element value in source file is not 'JPScore'.");
-                  // return false;
+                  return false;
              }
              TiXmlNode* xSourceF = xRootNodeSource->FirstChild("agents_sources");
              if (!xSourceF) {
                   Log->Write("ERROR:\tNo agents_sources tag in file not found.");
-                  //return false;
+                  return false;
              }
              Log->Write("INFO:\t  Loading sources from file");
              TiXmlNode* xSourceNodeF = xSourceF->FirstChild("source");
-- 
GitLab