diff options
Diffstat (limited to 'TAO/tao/PortableServer/Upcall_Wrapper.cpp')
-rw-r--r-- | TAO/tao/PortableServer/Upcall_Wrapper.cpp | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/TAO/tao/PortableServer/Upcall_Wrapper.cpp b/TAO/tao/PortableServer/Upcall_Wrapper.cpp index 03f43f30400..cdf37af7b09 100644 --- a/TAO/tao/PortableServer/Upcall_Wrapper.cpp +++ b/TAO/tao/PortableServer/Upcall_Wrapper.cpp @@ -229,18 +229,24 @@ TAO::Upcall_Wrapper::pre_upcall (TAO_InputCDR & cdr, // always the first element in the array, regardless of // whether or not the return type is void. - TAO::Argument * const * const begin = args + 1; // Skip the return value. - TAO::Argument * const * const end = args + nargs; + try { + TAO::Argument * const * const begin = args + 1; // Skip the return value. + TAO::Argument * const * const end = args + nargs; - for (TAO::Argument * const * i = begin; i != end; ++i) - { - if (!(*i)->demarshal (cdr)) - { - TAO_InputCDR::throw_skel_exception (errno); - } - } + for (TAO::Argument * const * i = begin; i != end; ++i) + { + if (!(*i)->demarshal (cdr)) + { + TAO_InputCDR::throw_skel_exception (errno); + } + } - cdr.reset_vt_indirect_maps (); + cdr.reset_vt_indirect_maps (); + } + catch (...) { + cdr.reset_vt_indirect_maps (); + throw; + } } void @@ -252,20 +258,28 @@ TAO::Upcall_Wrapper::post_upcall (TAO_ServerRequest& server_request, TAO::Argument * const * const begin = args; TAO::Argument * const * const end = args + nargs; - for (TAO::Argument * const * i = begin; i != end; ++i) - { - if (!(*i)->marshal (cdr)) - { - TAO_OutputCDR::throw_skel_exception (errno); - } - } + try { + for (TAO::Argument * const * i = begin; i != end; ++i) + { + if (!(*i)->marshal (cdr)) + { + TAO_OutputCDR::throw_skel_exception (errno); + } + } - // Reply body marshaling completed. No other fragments to send. - cdr.more_fragments (false); + // Reply body marshaling completed. No other fragments to send. + cdr.more_fragments (false); + #ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION + cdr.reset_vt_indirect_maps (); + #endif + } + catch (...) { #ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION - cdr.reset_vt_indirect_maps (); + cdr.reset_vt_indirect_maps (); #endif + throw; + } } TAO_END_VERSIONED_NAMESPACE_DECL |