diff options
Diffstat (limited to 'cppuhelper/source/implbase.cxx')
-rw-r--r-- | cppuhelper/source/implbase.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index b8bc91b769b1..f16c587431f0 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -18,11 +18,13 @@ */ #include <cppuhelper/compbase_ex.hxx> +#include <cppuhelper/exc_hlp.hxx> #include <osl/diagnose.h> #include <rtl/instance.hxx> #include <rtl/string.hxx> #include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/uno/RuntimeException.hpp> using namespace ::osl; @@ -120,8 +122,10 @@ void WeakComponentImplHelperBase::dispose() } catch (Exception & exc) { - throw RuntimeException( - "unexpected UNO exception caught: " + exc.Message ); + css::uno::Any anyEx = cppu::getCaughtException(); + throw lang::WrappedTargetRuntimeException( + "unexpected UNO exception caught: " + exc.Message, + nullptr, anyEx ); } } } @@ -244,8 +248,10 @@ void WeakAggComponentImplHelperBase::dispose() } catch (Exception & exc) { - throw RuntimeException( - "unexpected UNO exception caught: " + exc.Message ); + css::uno::Any anyEx = cppu::getCaughtException(); + throw lang::WrappedTargetRuntimeException( + "unexpected UNO exception caught: " + exc.Message, + nullptr, anyEx ); } } } |