diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-12-23 23:50:47 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-12-23 23:50:47 +0000 |
commit | 0d62cfa3634e36fe8e7961456ea317b392e1602f (patch) | |
tree | 14c2173d15a81c00e7aa0bb94f341afe3c3a4cdd /TAO/tao/Object_T.cpp | |
parent | fbfd825b26fb71c5637fc295656f0e205abfa9fa (diff) | |
download | ATCD-0d62cfa3634e36fe8e7961456ea317b392e1602f.tar.gz |
ChangeLogTag:Tue Dec 23 17:47:41 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/Object_T.cpp')
-rw-r--r-- | TAO/tao/Object_T.cpp | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/TAO/tao/Object_T.cpp b/TAO/tao/Object_T.cpp index c44bdc66fea..a5f43a350b6 100644 --- a/TAO/tao/Object_T.cpp +++ b/TAO/tao/Object_T.cpp @@ -32,15 +32,45 @@ namespace TAO return T::_nil (); } - return TAO::Narrow_Utils<T>::unchecked_narrow (obj, pbf); + return TAO::Narrow_Utils<T>::unchecked_narrow (obj, + repo_id, + pbf + ACE_ENV_ARG_PARAMETER); } - - template<typename T> - T * + template<typename T> T * Narrow_Utils<T>::unchecked_narrow (CORBA::Object_ptr obj, Proxy_Broker_Factory pbf) { + ACE_DECLARE_NEW_CORBA_ENV; + + T *proxy = 0; + ACE_TRY + { + proxy = + TAO::Narrow_Utils<T>::unchecked_narrow (obj, + 0, + pbf + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + // Swallow the exception + return 0; + } + ACE_ENDTRY; + ACE_CHECK; + + return proxy; + } + + template<typename T> T * + Narrow_Utils<T>::unchecked_narrow (CORBA::Object_ptr obj, + const char *, + Proxy_Broker_Factory pbf + ACE_ENV_ARG_DECL) + { if (CORBA::is_nil (obj)) { return T::_nil (); @@ -66,12 +96,11 @@ namespace TAO && obj->_is_collocated () && pbf != 0; - ACE_NEW_RETURN (proxy, - T (stub, - collocated ? 1 : 0, - obj->_servant ()), - T::_nil ()); - + ACE_NEW_THROW_EX (proxy, + T (stub, + collocated ? 1 : 0, + obj->_servant ()), + CORBA::NO_MEMORY ()); return proxy; } |