summaryrefslogtreecommitdiff
path: root/TAO/tao/IORInterceptor
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-07-18 16:26:20 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-07-18 16:26:20 +0000
commit2d779ef5506d5cbc41d5b33fdaab78a0d18033ad (patch)
tree38094914746f522c9a9e1309cee44dcf41b05997 /TAO/tao/IORInterceptor
parent3ddeea240a19868691486900571199a4338e0d41 (diff)
downloadATCD-2d779ef5506d5cbc41d5b33fdaab78a0d18033ad.tar.gz
Sun Jul 18 08:54:29 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/IORInterceptor')
-rw-r--r--TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp48
1 files changed, 33 insertions, 15 deletions
diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
index 43ae330d3a1..727319bb0e7 100644
--- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
+++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp
@@ -1,11 +1,13 @@
// $Id$
#include "IORInterceptor_Adapter_Impl.h"
+#include "tao/debug.h"
ACE_RCSID (IORInterceptor,
IORInterceptor_Adapter_Impl,
"$Id$")
+
TAO_IORInterceptor_Adapter_Impl::~TAO_IORInterceptor_Adapter_Impl (void)
{
}
@@ -32,23 +34,39 @@ TAO_IORInterceptor_Adapter_Impl::destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL)
const size_t len = i.size ();
size_t ilen = len;
- for (size_t k = 0; k < len; ++k)
+ ACE_TRY
+ {
+ for (size_t k = 0; k < len; ++k)
+ {
+ // Destroy the interceptors in reverse order in case the
+ // array list is only partially destroyed and another
+ // invocation occurs afterwards.
+ --ilen;
+
+ i[k]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Since Interceptor::destroy() can throw an exception,
+ // decrease the size of the interceptor array incrementally
+ // since some interceptors may not have been destroyed yet.
+ // Note that this size reduction is fast since no memory is
+ // actually deallocated.
+ i.size (ilen);
+ }
+ }
+ ACE_CATCHALL
{
- // Destroy the interceptors in reverse order in case the array
- // list is only partially destroyed and another invocation
- // occurs afterwards.
- --ilen;
-
- i[k].in()->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- // Since Interceptor::destroy() can throw an exception, decrease
- // the size of the interceptor array incrementally since some
- // interceptors may not have been destroyed yet. Note that this
- // size reduction is fast since no memory is actually
- // deallocated.
- i.size (ilen);
+ // Exceptions should not be propagated beyond this call.
+ if (TAO_debug_level > 3)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - Exception in ")
+ ACE_TEXT ("IORInterceptor_Adapter_Impl")
+ ACE_TEXT ("::destroy_interceptors () \n")));
+ }
}
+ ACE_ENDTRY;
+ ACE_CHECK;
delete this;
}