From 2bf22ee253fc8e7ca65a91e5fc8e36393af18860 Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 12 Nov 2010 15:56:07 +0000 Subject: [PATCH] Cosmetics on the output when parsing the platform raises an exception git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8537 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- teshsuite/simdag/platforms/flatifier.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index a846a52ea4..3ff8d2d420 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -18,6 +18,7 @@ #include "simdag/simdag.h" #include "xbt/log.h" #include "xbt/dict.h" +#include "xbt/ex.h" XBT_LOG_NEW_DEFAULT_CATEGORY(validator, "Logging specific to this SimDag example"); @@ -48,6 +49,7 @@ int main(int argc, char **argv) xbt_dict_t props = NULL; xbt_dict_cursor_t cursor = NULL; char *key, *data; + xbt_ex_t e; const SD_workstation_t *hosts; const SD_link_t *links, *tmp; @@ -56,7 +58,12 @@ int main(int argc, char **argv) platformFile = argv[1]; DEBUG1("%s", platformFile); - SD_create_environment(platformFile); + TRY { + SD_create_environment(platformFile); + } CATCH(e) { + xbt_die(bprintf("Error while loading %s: %s",platformFile,e.msg)); + } + printf("\n"); printf("\n"); -- 2.20.1