Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
dont call HANDLER
[simgrid.git] / teshsuite / simdag / flatifier / flatifier.cpp
index 31f1dc8..3140fd4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -35,14 +35,9 @@ static bool parse_cmdline(int* timings, char** platformFile, int argc, char** ar
 
 static void create_environment(xbt_os_timer_t parse_time, const char *platformFile)
 {
-  try {
-    xbt_os_cputimer_start(parse_time);
-    SD_create_environment(platformFile);
-    xbt_os_cputimer_stop(parse_time);
-  }
-  catch (std::exception& e) {
-    xbt_die("Error while loading %s: %s", platformFile, e.what());
-  }
+  xbt_os_cputimer_start(parse_time);
+  SD_create_environment(platformFile);
+  xbt_os_cputimer_stop(parse_time);
 }
 
 static void dump_hosts()
@@ -66,7 +61,7 @@ static void dump_hosts()
     if (not keys.empty()) {
       std::printf(">\n");
       std::sort(keys.begin(), keys.end());
-      for (std::string key : keys)
+      for (const std::string& key : keys)
         std::printf("    <prop id=\"%s\" value=\"%s\"/>\n", key.c_str(), props->at(key).c_str());
       std::printf("  </host>\n");
     } else {
@@ -186,7 +181,7 @@ static void dump_platform()
   int version = 4;
 
   std::printf("<?xml version='1.0'?>\n");
-  std::printf("<!DOCTYPE platform SYSTEM \"http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd\">\n");
+  std::printf("<!DOCTYPE platform SYSTEM \"https://simgrid.org/simgrid.dtd\">\n");
   std::printf("<platform version=\"%d\">\n", version);
   std::printf("<AS id=\"AS0\" routing=\"Full\">\n");