From 8ec047030f5ff5b8235b68eed06c7ed68ddeecfe Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 26 Jul 2014 15:22:46 +0100 Subject: coverity#706541 Uncaught exception and coverity#706537 Uncaught exception Change-Id: I403d83bb7aa4cf82edf1b6c608f9daac31576208 --- forms/source/inc/InterfaceContainer.hxx | 2 +- forms/source/misc/InterfaceContainer.cxx | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'forms') diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index a75f39278637..36a219a38bab 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -119,7 +119,7 @@ public: OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfaceContainer& _cloneSource ); // late constructor for cloning - void clonedFrom( const OInterfaceContainer& _cloneSource ); + void clonedFrom(const OInterfaceContainer& _cloneSource) throw(css::uno::RuntimeException, std::exception); protected: virtual ~OInterfaceContainer(); diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 27b246d30ec4..ea989e3e67ee 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -199,8 +200,7 @@ OInterfaceContainer::OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfac impl_createEventAttacher_nothrow(); } - -void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource ) +void OInterfaceContainer::clonedFrom(const OInterfaceContainer& _cloneSource) throw(RuntimeException, std::exception) { try { @@ -213,9 +213,13 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource ) insertByIndex( i, makeAny( xClone ) ); } } - catch( const Exception& ) + catch (const RuntimeException&) + { + throw; + } + catch (const Exception&) { - throw WrappedTargetException( + throw WrappedTargetRuntimeException( "Could not clone the given interface hierarchy.", static_cast< XIndexContainer* >( const_cast< OInterfaceContainer* >( &_cloneSource ) ), ::cppu::getCaughtException() @@ -223,7 +227,6 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource ) } } - void OInterfaceContainer::impl_createEventAttacher_nothrow() { try -- cgit