Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar
[simgrid.git] / src / bindings / java / jmsg.cpp
index f8fff39..41db649 100644 (file)
@@ -74,8 +74,7 @@ void jmsg_throw_status(JNIEnv *env, msg_error_t status) {
         jxbt_throw_task_cancelled(env,nullptr);
     break;
     default:
-        jxbt_throw_native(env,xbt_strdup("undefined message failed "
-          "(please see jmsg_throw_status function in jmsg.cpp)"));
+      xbt_die("undefined message failed (please see jmsg_throw_status function in jmsg.cpp)");
   }
 }
 
@@ -256,12 +255,12 @@ Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, jstring jde
   MSG_launch_application(deploymentFile);
 }
 
-SG_END_DECL()
-
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit() {
-  sg_energy_plugin_init();
+  sg_host_energy_plugin_init();
 }
 
+SG_END_DECL()
+
 /** Run a Java org.simgrid.msg.Process
  *
  *  If needed, this waits for the process starting time.