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 | ac0a38c9db5f3caec500140702de9ba03f811744 (patch) | |
tree | b3f9a364fb46e3b78d1800244a3c21875676f990 /cppuhelper/source/weak.cxx | |
parent | 3ebbdfec201017edc00e98c07da516761bf1c2dc (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/source/weak.cxx')
-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 7eb634e3b604..7aa067355bcc 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 |