Kaydet (Commit) 8ec04703 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#706541 Uncaught exception

and

coverity#706537 Uncaught exception

Change-Id: I403d83bb7aa4cf82edf1b6c608f9daac31576208
üst 850be5e3
...@@ -119,7 +119,7 @@ public: ...@@ -119,7 +119,7 @@ public:
OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfaceContainer& _cloneSource ); OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfaceContainer& _cloneSource );
// late constructor for cloning // late constructor for cloning
void clonedFrom( const OInterfaceContainer& _cloneSource ); void clonedFrom(const OInterfaceContainer& _cloneSource) throw(css::uno::RuntimeException, std::exception);
protected: protected:
virtual ~OInterfaceContainer(); virtual ~OInterfaceContainer();
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/io/WrongFormatException.hpp> #include <com/sun/star/io/WrongFormatException.hpp>
#include <com/sun/star/io/XMarkableStream.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/lang/XComponent.hpp>
#include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/form/XForm.hpp> #include <com/sun/star/form/XForm.hpp>
...@@ -199,8 +200,7 @@ OInterfaceContainer::OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfac ...@@ -199,8 +200,7 @@ OInterfaceContainer::OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfac
impl_createEventAttacher_nothrow(); impl_createEventAttacher_nothrow();
} }
void OInterfaceContainer::clonedFrom(const OInterfaceContainer& _cloneSource) throw(RuntimeException, std::exception)
void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource )
{ {
try try
{ {
...@@ -213,9 +213,13 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource ) ...@@ -213,9 +213,13 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource )
insertByIndex( i, makeAny( xClone ) ); 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.", "Could not clone the given interface hierarchy.",
static_cast< XIndexContainer* >( const_cast< OInterfaceContainer* >( &_cloneSource ) ), static_cast< XIndexContainer* >( const_cast< OInterfaceContainer* >( &_cloneSource ) ),
::cppu::getCaughtException() ::cppu::getCaughtException()
...@@ -223,7 +227,6 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource ) ...@@ -223,7 +227,6 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource )
} }
} }
void OInterfaceContainer::impl_createEventAttacher_nothrow() void OInterfaceContainer::impl_createEventAttacher_nothrow()
{ {
try try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment