diff options
Diffstat (limited to 'javaunohelper')
-rw-r--r-- | javaunohelper/Library_juhx.mk | 1 | ||||
-rw-r--r-- | javaunohelper/source/bootstrap.cxx | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/javaunohelper/Library_juhx.mk b/javaunohelper/Library_juhx.mk index 1a24e5ef54f2..6eacff250c0f 100644 --- a/javaunohelper/Library_juhx.mk +++ b/javaunohelper/Library_juhx.mk @@ -19,6 +19,7 @@ $(eval $(call gb_Library_use_libraries,juhx,\ jvmaccess \ sal \ salhelper \ + tl \ )) $(eval $(call gb_Library_add_exception_objects,juhx,\ diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx index cb927de74e9f..442dd00ef2c5 100644 --- a/javaunohelper/source/bootstrap.cxx +++ b/javaunohelper/source/bootstrap.cxx @@ -38,6 +38,7 @@ #include <jni.h> #include <jvmaccess/virtualmachine.hxx> #include <jvmaccess/unovirtualmachine.hxx> +#include <tools/diagnose_ex.h> #include "juhx-export-functions.hxx" #include "vm.hxx" @@ -148,10 +149,11 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( } catch (const RuntimeException & exc) { + css::uno::Any exAny( cppu::getCaughtException() ); jclass c = jni_env->FindClass( "com/sun/star/uno/RuntimeException" ); if (nullptr != c) { - SAL_WARN("javaunohelper", "forwarding RuntimeException: " << exc ); + SAL_WARN("javaunohelper", "forwarding RuntimeException: " << exceptionToString(exAny) ); OString cstr( OUStringToOString( exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) ); jni_env->ThrowNew( c, cstr.getStr() ); @@ -159,10 +161,11 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( } catch (const Exception & exc) { + css::uno::Any ex( cppu::getCaughtException() ); jclass c = jni_env->FindClass( "com/sun/star/uno/Exception" ); if (nullptr != c) { - SAL_WARN("javaunohelper", "forwarding Exception: " << exc ); + SAL_WARN("javaunohelper", "forwarding Exception: " << exceptionToString(ex) ); OString cstr( OUStringToOString( exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) ); jni_env->ThrowNew( c, cstr.getStr() ); |