X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f8ebed39786069c8da2dbaab5fa252365f1d2070..4ff5af63978e7be02245b942faa818520488ed71:/src/xbt/ex.c diff --git a/src/xbt/ex.c b/src/xbt/ex.c index bdb3aa2d4e..3f333ce914 100644 --- a/src/xbt/ex.c +++ b/src/xbt/ex.c @@ -211,24 +211,33 @@ const char *xbt_ex_catname(xbt_errcat_t cat) { switch (cat) { case unknown_error: - return "unknown_err"; + return "unknown error"; case arg_error: - return "invalid_arg"; + return "invalid argument"; + case bound_error: + return "out of bounds"; case mismatch_error: return "mismatch"; case not_found_error: return "not found"; case system_error: - return "system_err"; + return "system error"; case network_error: - return "network_err"; + return "network error"; case timeout_error: return "timeout"; + case cancel_error: + return "action canceled"; case thread_error: - return "thread_err"; - default: - return "INVALID_ERR"; + return "thread error"; + case host_error: + return "host failed"; + case tracing_error: + return "tracing error"; + case io_error: + return "io error"; } + return "INVALID ERROR"; } @@ -297,7 +306,7 @@ XBT_TEST_UNIT("value", test_value, "exception value passing") CATCH(ex) { xbt_test_add("exception value passing"); if (ex.category != unknown_error) - xbt_test_fail("category=%d (!= 1)", ex.category); + xbt_test_fail("category=%d (!= 1)", (int)ex.category); if (ex.value != 2) xbt_test_fail("value=%d (!= 2)", ex.value); if (strcmp(ex.msg, "toto"))