Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Handle CancelException in MSG_{comm,test} too.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 22 Feb 2019 10:02:35 +0000 (11:02 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 22 Feb 2019 10:02:35 +0000 (11:02 +0100)
src/msg/msg_gos.cpp

index 7a80ef3..883360f 100644 (file)
@@ -458,6 +458,9 @@ int MSG_comm_test(msg_comm_t comm)
   } catch (simgrid::TimeoutError& e) {
     comm->status = MSG_TIMEOUT;
     finished     = true;
+  } catch (simgrid::CancelException& e) {
+    comm->status = MSG_HOST_FAILURE;
+    finished     = true;
   }
   catch (xbt_ex& e) {
     if (e.category == network_error) {
@@ -497,6 +500,9 @@ int MSG_comm_testany(xbt_dynar_t comms)
   } catch (simgrid::TimeoutError& e) {
     finished_index = e.value;
     status         = MSG_TIMEOUT;
+  } catch (simgrid::CancelException& e) {
+    finished_index = e.value;
+    status         = MSG_HOST_FAILURE;
   }
   catch (xbt_ex& e) {
     if (e.category != network_error)
@@ -546,6 +552,8 @@ msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout)
     /* FIXME: these functions are not traceable */
   } catch (simgrid::TimeoutError& e) {
     comm->status = MSG_TIMEOUT;
+  } catch (simgrid::CancelException& e) {
+    comm->status = MSG_HOST_FAILURE;
   }
   catch (xbt_ex& e) {
     if (e.category == network_error)
@@ -593,6 +601,9 @@ int MSG_comm_waitany(xbt_dynar_t comms)
   } catch (simgrid::TimeoutError& e) {
     finished_index = e.value;
     status         = MSG_TIMEOUT;
+  } catch (simgrid::CancelException& e) {
+    finished_index = e.value;
+    status         = MSG_HOST_FAILURE;
   }
   catch(xbt_ex& e) {
     if (e.category == network_error) {