summaryrefslogtreecommitdiffstats
path: root/javaunohelper/source/bootstrap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'javaunohelper/source/bootstrap.cxx')
-rw-r--r--javaunohelper/source/bootstrap.cxx7
1 files changed, 5 insertions, 2 deletions
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() );