diff options
Diffstat (limited to 'stoc/source/javavm/javavm.cxx')
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 6a6652390683..97167891c3e2 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -642,9 +642,10 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & try { m_xUnoVirtualMachine = new jvmaccess::UnoVirtualMachine(vm, nullptr); } catch (jvmaccess::UnoVirtualMachine::CreationException &) { - throw css::uno::RuntimeException( + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( "jvmaccess::UnoVirtualMachine::CreationException", - static_cast< cppu::OWeakObject * >(this)); + static_cast< cppu::OWeakObject * >(this), anyEx ); } } } @@ -870,9 +871,10 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) jvmaccess::VirtualMachine::AttachGuard guard(m_xVirtualMachine); setUpUnoVirtualMachine(guard.getEnvironment()); } catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { - throw css::uno::RuntimeException( + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( "jvmaccess::VirtualMachine::AttachGuard::CreationException occurred", - static_cast< cppu::OWeakObject * >(this)); + static_cast< cppu::OWeakObject * >(this), anyEx ); } } switch (returnType) { @@ -961,10 +963,11 @@ void SAL_CALL JavaVirtualMachine::registerThread() } catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { - throw css::uno::RuntimeException( + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( "JavaVirtualMachine::registerThread: jvmaccess::" "VirtualMachine::AttachGuard::CreationException", - static_cast< cppu::OWeakObject * >(this)); + static_cast< cppu::OWeakObject * >(this), anyEx ); } } @@ -1234,9 +1237,10 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( } catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { - throw css::uno::RuntimeException( + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( "jvmaccess::VirtualMachine::AttachGuard::CreationException", - nullptr); + static_cast< cppu::OWeakObject * >(this), anyEx ); } } } @@ -1476,9 +1480,10 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { try { baseUrl = exp->expandMacros("$URE_INTERNAL_JAVA_DIR/"); } catch (css::lang::IllegalArgumentException &) { - throw css::uno::RuntimeException( + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( "css::lang::IllegalArgumentException", - static_cast< cppu::OWeakObject * >(this)); + static_cast< cppu::OWeakObject * >(this), anyEx ); } OUString classPath; try { @@ -1576,9 +1581,10 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) { m_xUnoVirtualMachine = new jvmaccess::UnoVirtualMachine( m_xVirtualMachine, cl2); } catch (jvmaccess::UnoVirtualMachine::CreationException &) { - throw css::uno::RuntimeException( + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( "jvmaccess::UnoVirtualMachine::CreationException", - static_cast< cppu::OWeakObject * >(this)); + static_cast< cppu::OWeakObject * >(this), anyEx ); } } |