From ac0a38c9db5f3caec500140702de9ba03f811744 Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Wed, 27 Jun 2007 12:22:10 +0000
Subject: 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.
---
cppuhelper/source/weak.cxx | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
(limited to 'cppuhelper/source/weak.cxx')
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
#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
--
cgit