- xbt_assert1(fab.name,"Name of fabric #%d is NULL!",cursor);
- DEBUG1("Create the procdata for %s",fab.name);
- /* Check for our own errors */
- errcode = xbt_dict_get(pd->libdata, fab.name, &data);
- xbt_assert1(errcode == mismatch_error,
- "MayDay: two modules use '%s' as libdata name", fab.name);
-
- /* Add the data in place */
- xbt_dict_set(pd->libdata, fab.name, (fab.creator)(), fab.destructor);
-
+ xbt_assert1(fab.name,"Name of fabric #%d is NULL!",cursor);
+ DEBUG1("Create the procdata for %s",fab.name);
+ /* Check for our own errors */
+ TRY {
+ data = xbt_dict_get(pd->libdata, fab.name);
+ found = 1;
+ } CATCH(e) {
+ xbt_ex_free(e);
+ found = 0;
+ }
+ if (found)
+ THROW1(unknown_error,0,"MayDay: two modules use '%s' as libdata name", fab.name);
+
+ /* Add the data in place */
+ xbt_dict_set(pd->libdata, fab.name, (fab.creator)(), fab.destructor);