Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
doc improvement
[simgrid.git] / src / bindings / java / org / simgrid / msg / ProcessKilledError.java
index 023e5cf..b9ebb49 100644 (file)
@@ -1,14 +1,22 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/** This error class is only used to interrupt the java user code 
- * when the process gets killed by an external event.
- * Don't catch it.
+/** Used internally to interrupt the user code when the process gets killed.
+ *
+ * You can catch it for cleanups or to debug, but DO NOT BLOCK IT, or your simulation will segfault!
+ *
+ * <code>
+ * try {
+ *   getHost().off();
+ * } catch (ProcessKilledError e) {
+ *   e.printStackTrace();
+ *   throw e;
+ * }
+ * </code>
  */
 
 public class ProcessKilledError extends Error {