X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ce9cbf0e2aea0198cb08a735a3ad36c6471f5468..055f70fa5c9473b92721b4872fdcdb17857bb2b1:/src/bindings/java/jmsg_synchro.cpp diff --git a/src/bindings/java/jmsg_synchro.cpp b/src/bindings/java/jmsg_synchro.cpp index d25b97b14b..a831b3fafe 100644 --- a/src/bindings/java/jmsg_synchro.cpp +++ b/src/bindings/java/jmsg_synchro.cpp @@ -7,14 +7,14 @@ #include -#include "jmsg.h" +#include "jmsg.hpp" #include "jmsg_synchro.h" -#include "jxbt_utilities.h" +#include "jxbt_utilities.hpp" #include "xbt/synchro.h" -XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg); +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java); -SG_BEGIN_DECL() +extern "C" { static jfieldID jsynchro_field_Mutex_bind; @@ -33,9 +33,8 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Mutex_acquire(JNIEnv * env, jobject xbt_mutex_t mutex = (xbt_mutex_t)(uintptr_t)env->GetLongField(obj, jsynchro_field_Mutex_bind); try { xbt_mutex_acquire(mutex); - } - catch(xbt_ex& e) { - // Nothing to do + } catch (xbt_ex const& e) { + XBT_DEBUG("Caught an exception: %s", e.what()); } } @@ -95,5 +94,4 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Semaphore_nativeFinalize(JNIEnv * en sem = (msg_sem_t)(uintptr_t)env->GetLongField(obj, jsynchro_field_Semaphore_bind); MSG_sem_destroy(sem); } - -SG_END_DECL() +}