Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change exception raised if a StopRequest is catched in Host.off()
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 28 Feb 2019 09:12:07 +0000 (10:12 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 28 Feb 2019 09:12:07 +0000 (10:12 +0100)
src/bindings/java/jmsg_host.cpp
src/bindings/java/org/simgrid/msg/Host.java

index 299d8db..e25ad9d 100644 (file)
@@ -143,7 +143,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_on(JNIEnv *env, jobject jhost)
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_off(JNIEnv *env, jobject jhost) {
   msg_host_t host = jhost_get_native(env, jhost);
   if (not simgrid::kernel::context::StopRequest::try_n_catch([host]() { MSG_host_off(host); }))
-    jxbt_throw_host_failure(env, "");
+    jxbt_throw_by_name(env, "org/simgrid/msg/ProcessKilledError", "Process killed");
 }
 
 JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getCount(JNIEnv * env, jclass cls) {
index 6222186..6042b04 100644 (file)
@@ -111,7 +111,7 @@ public class Host {
        /** Starts the host if it is off */
        public native void on();
        /** Stops the host if it is on */
-       public native void off() throws HostFailureException;
+       public native void off() throws ProcessKilledError;
 
        /**
         * This method returns the speed of the processor of a host (in flops),