From: thiery Date: Fri, 4 Aug 2006 07:17:52 +0000 (+0000) Subject: Replace an exception by an assertion X-Git-Tag: v3.3~2672 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5f285af89b36ec6a649276f48223c9c0f701633a?ds=sidebyside Replace an exception by an assertion git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2687 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/dict.c b/src/xbt/dict.c index e69810ae40..3561e8a9ba 100644 --- a/src/xbt/dict.c +++ b/src/xbt/dict.c @@ -304,8 +304,7 @@ void xbt_dict_remove_ext(xbt_dict_t dict, */ void xbt_dict_remove(xbt_dict_t dict, const char *key) { - if (!dict) - THROW1(arg_error, 0, "Asked to remove key %s from NULL dict", key); + xbt_assert(dict); xbt_dict_remove_ext(dict, key, strlen(key)); } @@ -518,15 +517,6 @@ XBT_TEST_UNIT("remove",test_dict_remove,"Removing some values"){ xbt_dict_free(&head); - xbt_test_add0("Remove data from the NULL dict"); - TRY { - debuged_remove(head,"12345"); - } CATCH(e) { - if (e.category != arg_error) - xbt_test_exception(e); - xbt_ex_free(e); - } - xbt_test_add0("Remove each data manually (traversing the resulting dictionnary each time)"); fill(&head); debuged_remove(head,"12a"); traverse(head);