double time = jmillis / 1000 + jnanos / 1000;
MSG_error_t rv;
+ xbt_ex_t e;
TRY {
rv = MSG_process_sleep(time);
}
- CATCH_ANONYMOUS {
+ CATCH(e) {
+ xbt_ex_free(e);
return;
}
if (rv != MSG_OK) {
jdouble jseconds)
{
MSG_error_t rv;
+ xbt_ex_t e;
TRY {
rv = MSG_process_sleep((double)jseconds);
}
- CATCH_ANONYMOUS {
+ CATCH(e) {
+ xbt_ex_free(e);
return;
}
if (rv != MSG_OK) {
/* try to change the host of the process */
MSG_error_t rv = MSG_process_migrate(process, host);
- jxbt_check_res("MSG_process_migrate()", rv, MSG_OK,
- bprintf("unexpected error , please report this bug"));
+ if (rv != MSG_OK) {
+ jmsg_throw_status(env,rv);
+ }
/* change the host java side */
(*env)->SetObjectField(env, jprocess, jprocess_field_Process_host, jhost);
}