Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / java / process / suspend / Main.java
index 22af113..3eb4064 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,6 +9,10 @@ import org.simgrid.msg.Msg;
 import org.simgrid.msg.MsgException;
 
 public class Main {
+  private Main() {
+    throw new IllegalAccessError("Utility class");
+  }
+
   public static void main(String[] args) {
     Msg.init(args);
     if(args.length < 1) {
@@ -21,9 +25,9 @@ public class Main {
     try {
         DreamMaster process1 = new DreamMaster("Jacquelin","DreamMaster");
         process1.start();
-      } catch (MsgException e){
-        System.out.println("Create processes failed!");
-      }
+    } catch (MsgException e){
+      Msg.error("Create processes failed!");
+    }
 
     /*  execute the simulation. */
     Msg.run();