summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-10 11:40:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-10 12:50:24 +0100
commite263abafa09520765e29ce420fe8005d6f3e6fbe (patch)
tree2db40febc3971d80c411da9bb5d5dbcaf60a0f1b /comphelper
parent8a2da50632059be5845c0bf6c2fbbf7d7e560c43 (diff)
coverity#706275 Uncaught exception
Change-Id: I538cca9505411e8984ba821807c0072c0ce40e7b
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 21d8c399a211..1b5c22816bf5 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/io/XObjectOutputStream.hpp>
#include <com/sun/star/io/XMarkableStream.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/reflection/theCoreReflection.hpp>
@@ -244,7 +245,6 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR
}
}
-
// Methods of XAllListener
Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Event )
throw( InvocationTargetException, RuntimeException, std::exception )
@@ -314,7 +314,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
break;
}
}
- catch( CannotConvertException& )
+ catch (const CannotConvertException&)
{
// silent ignore conversions errors from a script call
Reference< XIdlClass > xListenerType = mpManager->getReflection()->
@@ -325,14 +325,22 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
Reference< XIdlClass > xRetType = xMeth->getReturnType();
Type aRetType(xRetType->getTypeClass(), xRetType->getName());
aRet.clear();
- convertToEventReturn( aRet, aRetType );
+ try
+ {
+ convertToEventReturn( aRet, aRetType );
+ }
+ catch (const CannotConvertException& e)
+ {
+ throw css::lang::WrappedTargetRuntimeException(
+ "wrapped CannotConvertException " + e.Message,
+ css::uno::Reference<css::uno::XInterface>(), makeAny(e));
+ }
}
}
}
return aRet;
}
-
// Methods of XEventListener
void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& )
throw( RuntimeException, std::exception )
@@ -340,7 +348,6 @@ void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& )
// It is up to the container to release the object
}
-
// Constructor method for EventAttacherManager
Reference< XEventAttacherManager > createEventAttacherManager( const Reference< XComponentContext > & rxContext )
throw( Exception )