From: mquinson Date: Wed, 4 Jul 2007 07:46:47 +0000 (+0000) Subject: Only use the basename of __FILE__ when propagating exceptions to avoid strange errors... X-Git-Tag: v3.3~1709 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1afaa52dfcf5663f782c011a90ac049e269ac9a6 Only use the basename of __FILE__ when propagating exceptions to avoid strange errors when using make check in a VPATH setting git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3651 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Msg/msg.c b/src/gras/Msg/msg.c index f1f89a4ad6..19adf4341f 100644 --- a/src/gras/Msg/msg.c +++ b/src/gras/Msg/msg.c @@ -684,8 +684,14 @@ gras_msg_handle(double timeOut) { } CATCH(e) { free(msg.payl); if (msg.type->kind == e_gras_msg_kind_rpccall) { + char *old_file=e.file; /* The callback raised an exception, propagate it on the network */ - if (!e.remote) { /* the exception is born on this machine */ + if (!e.remote) { + /* Make sure we reduce the file name to its basename to avoid issues in tests */ + char *new_file=strrchr(e.file,'/'); + if (new_file) + e.file = new_file; + /* the exception is born on this machine */ e.host = (char*)gras_os_myname(); xbt_ex_setup_backtrace(&e); } @@ -697,6 +703,7 @@ gras_msg_handle(double timeOut) { gras_socket_peer_port(msg.expe)); gras_msg_send_ext(msg.expe, e_gras_msg_kind_rpcerror, msg.ID, msg.type, &e); + e.file=old_file; xbt_ex_free(e); ctx.answer_due = 0; ran_ok=1;