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

coverity#706275 Uncaught exception

Change-Id: I538cca9505411e8984ba821807c0072c0ce40e7b
üst 8a2da506
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <com/sun/star/io/XPersistObject.hpp> #include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/io/XObjectOutputStream.hpp> #include <com/sun/star/io/XObjectOutputStream.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/XInitialization.hpp> #include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/reflection/theCoreReflection.hpp> #include <com/sun/star/reflection/theCoreReflection.hpp>
...@@ -244,7 +245,6 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR ...@@ -244,7 +245,6 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR
} }
} }
// Methods of XAllListener // Methods of XAllListener
Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Event ) Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Event )
throw( InvocationTargetException, RuntimeException, std::exception ) throw( InvocationTargetException, RuntimeException, std::exception )
...@@ -314,7 +314,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even ...@@ -314,7 +314,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
break; break;
} }
} }
catch( CannotConvertException& ) catch (const CannotConvertException&)
{ {
// silent ignore conversions errors from a script call // silent ignore conversions errors from a script call
Reference< XIdlClass > xListenerType = mpManager->getReflection()-> Reference< XIdlClass > xListenerType = mpManager->getReflection()->
...@@ -325,14 +325,22 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even ...@@ -325,14 +325,22 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
Reference< XIdlClass > xRetType = xMeth->getReturnType(); Reference< XIdlClass > xRetType = xMeth->getReturnType();
Type aRetType(xRetType->getTypeClass(), xRetType->getName()); Type aRetType(xRetType->getTypeClass(), xRetType->getName());
aRet.clear(); 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; return aRet;
} }
// Methods of XEventListener // Methods of XEventListener
void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& ) void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& )
throw( RuntimeException, std::exception ) throw( RuntimeException, std::exception )
...@@ -340,7 +348,6 @@ void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& ) ...@@ -340,7 +348,6 @@ void SAL_CALL AttacherAllListener_Impl::disposing(const EventObject& )
// It is up to the container to release the object // It is up to the container to release the object
} }
// Constructor method for EventAttacherManager // Constructor method for EventAttacherManager
Reference< XEventAttacherManager > createEventAttacherManager( const Reference< XComponentContext > & rxContext ) Reference< XEventAttacherManager > createEventAttacherManager( const Reference< XComponentContext > & rxContext )
throw( Exception ) throw( Exception )
......
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