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) {
/** 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),