Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Catch not_found_error. I'm just restoring the previous semantic... We have to decide...
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Aug 2005 22:14:38 +0000 (22:14 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Aug 2005 22:14:38 +0000 (22:14 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1663 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/dict.c

index 37bc175..1327951 100644 (file)
@@ -128,9 +128,18 @@ xbt_dict_get_ext(xbt_dict_t      dict,
 void *
 xbt_dict_get(xbt_dict_t     dict,
              const char     *key) {
+  xbt_ex_t e;
   xbt_assert(dict);
 
-  return xbt_dictelm_get(dict->head, key);
+  TRY {
+    return xbt_dictelm_get(dict->head, key);
+  } CATCH(e) {
+    if(e.category==not_found_error) {
+      return NULL;
+    }
+    RETHROW;
+  }
+  return NULL;
 }
 
 /**