INTEGRATION: CWS sb70 (1.12.46); FILE MERGED

2007/06/05 15:24:12 sb 1.12.46.1: #i62080# Properly handle exceptions within dispose loops.
This commit is contained in:
Jens-Heiner Rechtien 2007-06-27 12:22:10 +00:00
parent 3ebbdfec20
commit ac0a38c9db

View file

@ -4,9 +4,9 @@
*
* $RCSfile: weak.cxx,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: obo $ $Date: 2006-09-16 12:43:37 $
* last change: $Author: hr $ $Date: 2007-06-27 13:22:10 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -44,6 +44,7 @@
#ifndef _CPPU_HELPER_INTERFACECONTAINER_HXX_
#include <cppuhelper/interfacecontainer.hxx>
#endif
#include "cppuhelper/exc_hlp.hxx"
using namespace osl;
using namespace com::sun::star::uno;
@ -126,9 +127,24 @@ void SAL_CALL OWeakConnectionPoint::release() throw()
void SAL_CALL OWeakConnectionPoint::dispose() throw(::com::sun::star::uno::RuntimeException)
{
Any ex;
OInterfaceIteratorHelper aIt( m_aReferences );
while( aIt.hasMoreElements() )
((XReference *)aIt.next())->dispose();
{
try
{
((XReference *)aIt.next())->dispose();
}
catch (com::sun::star::lang::DisposedException &) {}
catch (RuntimeException &)
{
ex = cppu::getCaughtException();
}
}
if (ex.hasValue())
{
cppu::throwException(ex);
}
}
// XInterface