X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9189fe94c14ef9e31142d1603a1979ea7e731a0a..715c6e1f1a58b294f61b8c7d3536bd73218ba64a:/src/gras/Msg/msg.c diff --git a/src/gras/Msg/msg.c b/src/gras/Msg/msg.c index 88d443fd9f..6ec3e4d56e 100644 --- a/src/gras/Msg/msg.c +++ b/src/gras/Msg/msg.c @@ -147,7 +147,7 @@ gras_msgtype_declare_v(const char *name, msgtype = (gras_msgtype_t)xbt_set_get_by_name(_gras_msgtype_set,namev); found = 1; } CATCH(e) { - if (e.category != mismatch_error) + if (e.category != not_found_error) RETHROW; xbt_ex_free(e); } @@ -205,7 +205,7 @@ gras_msg_send(gras_socket_t sock, static gras_datadesc_type_t string_type=NULL; if (!msgtype) - THROW0(mismatch_error,0, + THROW0(arg_error,0, "Cannot send the NULL message (did msgtype_by_name fail?)"); if (!string_type) { @@ -248,9 +248,8 @@ gras_msg_recv(gras_socket_t sock, TRY { gras_trp_chunk_recv(sock, header, 6); } CATCH(e) { - THROW2(e.category,e.value, - "Exception caught while trying to get the mesage header on socket %p : %s", - sock,e.msg); + RETHROW1("Exception caught while trying to get the mesage header on socket %p : %s", + sock); } for (cpt=0; cpt<4; cpt++) @@ -482,6 +481,7 @@ gras_msg_handle(double timeOut) { } } + /* FIXME: gras_datadesc_free not implemented => leaking the payload */ THROW1(mismatch_error,0, "Message '%s' refused by all registered callbacks", msgtype->name); }