X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7eef625065d0b3af4a64b5665009491426db974f..dfb935741dbdd2a843f684538ab2403c082f633b:/teshsuite/simdag/platforms/flatifier.c diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index 86f2941de2..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,11 +58,17 @@ 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"); printf("\n"); + printf("\n"); totalHosts = SD_workstation_get_number(); hosts = SD_workstation_get_list(); @@ -111,12 +119,13 @@ int main(int argc, char **argv) tmp_length = SD_route_get_size(hosts[i], hosts[j]); for (k = 0; k < tmp_length; k++) { - printf("", SD_link_get_name(tmp[k])); + printf("", SD_link_get_name(tmp[k])); } printf("\n \n"); } } } + printf("\n"); printf("\n"); SD_exit();