Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[java] Fix RngStream.setPackageSeed
[simgrid.git] / src / bindings / java / jmsg_process.cpp
index 4455dd9..c6d0e7f 100644 (file)
@@ -6,6 +6,8 @@
 /* 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. */
 
+#include <xbt/ex.hpp>
+
 #include "jmsg_process.h"
 
 #include "jmsg.h"
@@ -274,11 +276,11 @@ JNICALL Java_org_simgrid_msg_Process_setAutoRestart (JNIEnv *env, jobject jproce
     return;
   }
 
-  TRY {
+  try {
     MSG_process_auto_restart_set(process,auto_restart);
   }
-  CATCH (e) {
-    xbt_ex_free(e);
+  catch (xbt_ex& e) {
+    // Nothing to do
   }
 }
 
@@ -291,11 +293,11 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_restart (JNIEnv *env, jobjec
     return;
   }
 
-  TRY {
+  try {
     MSG_process_restart(process);
   }
-  CATCH (e) {
-    xbt_ex_free(e);
+  catch (xbt_ex& e) {
+    // Nothing to do
   }
 
 }