if (xbt_set_length(pd->libdata) <
xbt_dynar_length(_gras_procdata_fabrics)) {
/* Damn, some new modules were added since procdata_init(). Amok? */
if (xbt_set_length(pd->libdata) <
xbt_dynar_length(_gras_procdata_fabrics)) {
/* Damn, some new modules were added since procdata_init(). Amok? */
cursor, xbt_set_length(pd->libdata));
continue; /* allow to recall this function to get recently added fabrics */
}
cursor, xbt_set_length(pd->libdata));
continue; /* allow to recall this function to get recently added fabrics */
}
- xbt_assert1(fab.name, "Name of fabric #%d is NULL!", cursor);
- DEBUG1("Create the procdata for %s", fab.name);
+ xbt_assert(fab.name, "Name of fabric #%d is NULL!", cursor);
+ XBT_DEBUG("Create the procdata for %s", fab.name);
- TRY {
- xbt_set_get_by_name(pd->libdata, fab.name);
- found = 1;
- }
- CATCH(e) {
- xbt_ex_free(e);
- found = 0;
- }
- if (found)
- THROW1(unknown_error, 0,
+
+ if (xbt_set_get_by_name_or_null(pd->libdata, fab.name) != NULL)
+ THROWF(unknown_error, 0,
"MayDay: two modules use '%s' as libdata name", fab.name);
/* Add the data in place, after some more sanity checking */
"MayDay: two modules use '%s' as libdata name", fab.name);
/* Add the data in place, after some more sanity checking */
res = bprintf("%s:%d", gras_os_myname(), gras_os_myport());
return (const char *) res;
}
res = bprintf("%s:%d", gras_os_myname(), gras_os_myport());
return (const char *) res;
}