A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cosmetics
[simgrid.git]
/
src
/
bindings
/
java
/
jmsg_vm.cpp
diff --git
a/src/bindings/java/jmsg_vm.cpp
b/src/bindings/java/jmsg_vm.cpp
index
608d9f8
..
063819d
100644
(file)
--- a/
src/bindings/java/jmsg_vm.cpp
+++ b/
src/bindings/java/jmsg_vm.cpp
@@
-6,6
+6,8
@@
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <xbt/ex.hpp>
+
#include "jmsg.h"
#include "jmsg_vm.h"
#include "jmsg_host.h"
#include "jmsg.h"
#include "jmsg_vm.h"
#include "jmsg_host.h"
@@
-100,7
+102,7
@@
JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm,
// disk_path = (*env)->GetStringUTFChars(env, jdiskpath, 0);
// disk_path = xbt_strdup(disk_path);
// disk_path = (*env)->GetStringUTFChars(env, jdiskpath, 0);
// disk_path = xbt_strdup(disk_path);
- msg_vm_t vm = MSG_vm_create(host, name, (int) jncore, (int) jramsize, (int) jnetcap,
NULL
, (int) jdisksize,
+ msg_vm_t vm = MSG_vm_create(host, name, (int) jncore, (int) jramsize, (int) jnetcap,
nullptr
, (int) jdisksize,
(int) jmig_netspeed, (int) jdp_intensity);
jvm_bind(env,jvm,vm);
(int) jmig_netspeed, (int) jdp_intensity);
jvm_bind(env,jvm,vm);
@@
-128,12
+130,11
@@
JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_internalmig(JNIEnv *env, jobject
{
msg_vm_t vm = jvm_get_native(env,jvm);
msg_host_t host = jhost_get_native(env, jhost);
{
msg_vm_t vm = jvm_get_native(env,jvm);
msg_host_t host = jhost_get_native(env, jhost);
- xbt_ex_t e;
- TRY{
+ try {
MSG_vm_migrate(vm,host);
MSG_vm_migrate(vm,host);
- }
CATCH(e){
- XBT_VERB("CATCH EXCEPTION MIGRATION %s",e.msg);
-
xbt_ex_free(e
);
+ }
+ catch(xbt_ex& e){
+
XBT_VERB("CATCH EXCEPTION MIGRATION %s",e.what()
);
jxbt_throw_host_failure(env, (char*)"during migration");
}
}
jxbt_throw_host_failure(env, (char*)"during migration");
}
}