summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/components.cxx8
-rw-r--r--configmgr/source/configurationregistry.cxx11
2 files changed, 13 insertions, 6 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index e296f8dfa8de..af666ba2b719 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -31,12 +31,14 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/WrappedTargetException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XInterface.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include <config_dconf.h>
#include <config_folders.h>
#include <osl/conditn.hxx>
@@ -453,8 +455,10 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
throw css::uno::RuntimeException(
"unknown external value descriptor ID: " + e.Message);
} catch (css::lang::WrappedTargetException & e) {
- throw css::uno::RuntimeException(
- "cannot obtain external value: " + e.Message);
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException(
+ "cannot obtain external value: " + e.Message,
+ nullptr, anyEx );
}
}
return value;
diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx
index 65a24c6903fa..628640c43974 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/registry/InvalidRegistryException.hpp>
#include <com/sun/star/registry/InvalidValueException.hpp>
#include <com/sun/star/registry/MergeConflictException.hpp>
@@ -48,6 +49,7 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/util/XFlushable.hpp>
#include <cppu/unotype.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
@@ -262,10 +264,11 @@ void Service::open(OUString const & rURL, sal_Bool bReadOnly, sal_Bool)
} catch (css::uno::RuntimeException &) {
throw;
} catch (css::uno::Exception & e) {
- throw css::uno::RuntimeException(
- ("com.sun.star.configuration.ConfigurationRegistry: open failed: " +
- e.Message),
- static_cast< cppu::OWeakObject * >(this));
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException(
+ "com.sun.star.configuration.ConfigurationRegistry: open failed: " +
+ e.Message,
+ static_cast< cppu::OWeakObject * >(this), anyEx );
}
url_ = rURL;
readOnly_ = bReadOnly;