diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 12:22:10 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 12:22:10 +0000 |
commit | 3668105a2357e50e8c96d11a26913f057885a99f (patch) | |
tree | d85918eddd5a9db456b3d7df3c1197d786ee0e5b /cppuhelper | |
parent | be877774b0c63e14b03090c9be687cecbe0424a0 (diff) |
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.
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/weak.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index 5c1a01849..78a7fef01 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -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 |