From: Arnaud Giersch Date: Fri, 22 Feb 2019 10:03:56 +0000 (+0100) Subject: Throw exception when comm was canceled. X-Git-Tag: v3_22~270^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/594b10a112b66208df1de4b26d65d93d601a128e?ds=sidebyside Throw exception when comm was canceled. --- diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 7eb4685229..c770e2ca8d 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -6,6 +6,7 @@ #include "src/msg/msg_private.hpp" #include "xbt/log.h" +#include "simgrid/Exception.hpp" #include "simgrid/s4u/Comm.hpp" #include "simgrid/s4u/Mailbox.hpp" @@ -168,7 +169,8 @@ Comm* Comm::wait_for(double timeout) return this; case State::CANCELED: - return this; + throw CancelException(XBT_THROW_POINT, "Communication canceled"); + default: THROW_IMPOSSIBLE; }