msg_process_t process = MSG_process_from_PID(pid);
if (not process) {
- jxbt_throw_process_not_found(env, bprintf("PID = %d",static_cast<int>(pid)));
+ jxbt_throw_process_not_found(env, std::string("PID = ") + std::to_string(static_cast<int>(pid)));
return nullptr;
}
/* try to suspend the process */
msg_error_t rv = MSG_process_suspend(process);
- jxbt_check_res("MSG_process_suspend()", rv, MSG_OK, bprintf("unexpected error , please report this bug"));
+ jxbt_check_res("MSG_process_suspend()", rv, MSG_OK, "unexpected error , please report this bug");
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_resume(JNIEnv * env, jobject jprocess)
/* try to resume the process */
msg_error_t res = MSG_process_resume(process);
- jxbt_check_res("MSG_process_resume()", res, MSG_OK, bprintf("unexpected error , please report this bug"));
+ jxbt_check_res("MSG_process_resume()", res, MSG_OK, "unexpected error , please report this bug");
}
JNIEXPORT void
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_restart (JNIEnv *env, jobject jprocess) {
msg_process_t process = jprocess_to_native(jprocess, env);
- xbt_ex_t e;
if (not process) {
jxbt_throw_notbound(env, "process", jprocess);
return;
}
- try {
- MSG_process_restart(process);
- }
- catch (xbt_ex& e) {
- // Nothing to do
- }
-
+ MSG_process_restart(process);
}
+
JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Process_isSuspended(JNIEnv * env, jobject jprocess)
{
msg_process_t process = jprocess_to_native(jprocess, env);