diff options
Diffstat (limited to 'scripting/source/provider/ProviderCache.cxx')
-rw-r--r-- | scripting/source/provider/ProviderCache.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 98103a8984e3..09cfbcb6c988 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -22,6 +22,7 @@ #include <tools/diagnose_ex.h> #include <com/sun/star/container/XContentEnumerationAccess.hpp> +#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include "ProviderCache.hxx" using namespace com::sun::star; @@ -168,10 +169,11 @@ ProviderCache::populateCache() } catch ( const Exception &e ) { - OUString temp = - "ProviderCache::populateCache: couldn't obtain XSingleComponentFactory for " - + serviceName; - throw RuntimeException( temp.concat( e.Message ) ); + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( + "ProviderCache::populateCache: couldn't obtain XSingleComponentFactory for " + serviceName + + " " + e.Message, + nullptr, anyEx ); } } @@ -185,7 +187,10 @@ ProviderCache::createProvider( ProviderDetails& details ) } catch ( const Exception& e ) { - throw RuntimeException( "ProviderCache::createProvider() Error creating provider from factory. " + e.Message ); + css::uno::Any anyEx = cppu::getCaughtException(); + throw css::lang::WrappedTargetRuntimeException( + "ProviderCache::createProvider() Error creating provider from factory. " + e.Message, + nullptr, anyEx ); } return details.provider; |