diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 15:22:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 15:39:28 +0100 |
commit | 8ec047030f5ff5b8235b68eed06c7ed68ddeecfe (patch) | |
tree | bf0663b28c2bb57c3ac6e6a0cde22235d009d785 /forms/source/misc/InterfaceContainer.cxx | |
parent | 850be5e3d14b91f1097be9ac9c12ef85c13b55f8 (diff) |
coverity#706541 Uncaught exception
and
coverity#706537 Uncaught exception
Change-Id: I403d83bb7aa4cf82edf1b6c608f9daac31576208
Diffstat (limited to 'forms/source/misc/InterfaceContainer.cxx')
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
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 <com/sun/star/container/XNamed.hpp> #include <com/sun/star/io/WrongFormatException.hpp> #include <com/sun/star/io/XMarkableStream.hpp> +#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/form/XForm.hpp> @@ -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 |