Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
[simgrid.git] / examples / java / energy / vm / EnergyVMRunner.java
index b7a2102..4094a20 100644 (file)
@@ -30,6 +30,7 @@ public class EnergyVMRunner extends Process {
       try {
         task.execute();
       } catch (HostFailureException | TaskCancelledException e) {
+        Msg.error(e.getMessage());
         e.printStackTrace();
       } 
       Msg.info("This worker is done."); 
@@ -41,10 +42,7 @@ public class EnergyVMRunner extends Process {
   }
 
   @Override
-  public void main(String[] strings) throws MsgException, HostNotFoundException {
-    double startTime = 0;
-    double endTime = 0;
-
+  public void main(String[] strings) throws HostNotFoundException, HostFailureException {
     /* get hosts */
     Host host1 = Host.getByName("MyHost1");
     Host host2 = Host.getByName("MyHost2");