Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / examples / java / async / waitall / Receiver.java
index 7296bfb..6e528c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2007, 2010, 2013-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -19,6 +19,7 @@ public class Receiver extends Process {
     super(host,name);
   }
 
+  @Override
   public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
     Comm comm = Task.irecv(getHost().getName());
     Msg.info("I started receiving on '"+ getHost().getName() +". Wait 0.1 second, and block on the communication.");
@@ -27,7 +28,7 @@ public class Receiver extends Process {
        comm.waitCompletion();
     } catch (TimeoutException e) {
        Msg.info("Timeout while waiting for my task");
-       return; // Stop this process
+       throw e; // Stop this process
     }
     Msg.info("I got my task, good bye.");
   }