diff options
author | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-07 07:13:31 +0000 |
---|---|---|
committer | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-07 07:13:31 +0000 |
commit | 87788758d24f539800e58c828ce2933d46fc692f (patch) | |
tree | 5791b64f5651f05472fd23ad40680618926b4a3d /TAO/tao/PortableServer/Upcall_Wrapper.cpp | |
parent | 9f6617514ccb86ffff4f06d2563ca58c85412ec8 (diff) | |
download | ATCD-87788758d24f539800e58c828ce2933d46fc692f.tar.gz |
Mon Dec 7 07:13:34 UTC 2009 Yan Dai <dai_y@ociweb.com>
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 |