X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c2684b76528879ff769dfac428eb9a07c6069285..fba664482175a3b24521a7b748b221549b8004f2:/testsuite/xbt/dict_usage.c?ds=sidebyside diff --git a/testsuite/xbt/dict_usage.c b/testsuite/xbt/dict_usage.c index 04f4680747..c71e52482e 100644 --- a/testsuite/xbt/dict_usage.c +++ b/testsuite/xbt/dict_usage.c @@ -91,11 +91,9 @@ static void search_not_found(xbt_dict_t head, const char *data) { data = xbt_dict_get(head,"Can't be found"); THROW1(unknown_error,0,"Found something which shouldn't be there (%s)",data); } CATCH(e) { - if (e.category == mismatch_error) { - xbt_ex_free(e); - } else { + if (e.category != not_found_error) RETHROW; - } + xbt_ex_free(e); } } @@ -192,7 +190,7 @@ xbt_dict_dump(head,(void (*)(void*))&printf); TRY { debuged_remove(head,"Does not exist"); } CATCH(e) { - if (e.category != mismatch_error) + if (e.category != not_found_error) RETHROW; xbt_ex_free(e); } @@ -218,7 +216,7 @@ xbt_dict_dump(head,(void (*)(void*))&printf); TRY { debuged_remove(head,"12346"); } CATCH(e) { - if (e.category != mismatch_error) + if (e.category != not_found_error) RETHROW; xbt_ex_free(e); traverse(head); } @@ -228,7 +226,7 @@ xbt_dict_dump(head,(void (*)(void*))&printf); TRY { debuged_remove(head,"12346"); } CATCH(e) { - if (e.category != mismatch_error) + if (e.category != not_found_error) RETHROW; xbt_ex_free(e); traverse(head); }