diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp b/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp index 87944856506..103af8d6117 100644 --- a/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp +++ b/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp @@ -10,30 +10,24 @@ Test_i::Test_i (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate(orb)), policies_ (1) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { CORBA::Object_var obj = - orb_->resolve_initial_references ("RootPOA" - ACE_ENV_ARG_PARAMETER); + orb_->resolve_initial_references ("RootPOA"); this->root_poa_ = - PortableServer::POA::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (obj.in ()); policies_.length(1); policies_[0] = - root_poa_->create_lifespan_policy (PortableServer::PERSISTENT - ACE_ENV_ARG_PARAMETER); + root_poa_->create_lifespan_policy (PortableServer::PERSISTENT); this->poa_mgr_ = this->root_poa_->the_POAManager (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Caught exception"); + ex._tao_print_exception ("Caught exception"); ACE_ASSERT (0); // Force termination! } - ACE_ENDTRY; } Test_i::~Test_i (void) @@ -45,15 +39,14 @@ int Test_i::try_and_create_POA (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_TRY + try { PortableServer::POA_var persistent_poa = root_poa_->create_POA ("MyPoa", poa_mgr_.in (), - this->policies_ - ACE_ENV_ARG_PARAMETER); + this->policies_); } - ACE_CATCH (CORBA::TRANSIENT, ex) + catch (const CORBA::TRANSIENT& ex) { // A transient exception exception may be expected, // so we won't print out the word exception but we @@ -62,13 +55,11 @@ Test_i::try_and_create_POA (void) "CORBA::TRANSIENT in Test_i::try_and_create_POA\n")); return 1; } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "try_and_create_POA Exception ..."); + ex._tao_print_exception ("try_and_create_POA Exception ..."); return 1; } - ACE_ENDTRY; return 0; } @@ -77,5 +68,5 @@ void Test_i::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); + orb_->shutdown (0); } |