summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp')
-rw-r--r--TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp44
1 files changed, 15 insertions, 29 deletions
diff --git a/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp b/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp
index dbfcefcb23b..6aa1ec88f69 100644
--- a/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp
+++ b/TAO/orbsvcs/tests/Bug_1395_Regression/Test_i.cpp
@@ -10,34 +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);
- ACE_TRY_CHECK;
+ orb_->resolve_initial_references ("RootPOA");
this->root_poa_ =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ PortableServer::POA::_narrow (obj.in ());
policies_.length(1);
policies_[0] =
- root_poa_->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa_->create_lifespan_policy (PortableServer::PERSISTENT);
this->poa_mgr_ =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ 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)
@@ -46,19 +36,17 @@ Test_i::~Test_i (void)
}
int
-Test_i::try_and_create_POA (ACE_ENV_SINGLE_ARG_DECL)
+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);
- ACE_TRY_CHECK;
+ this->policies_);
}
- ACE_CATCH (CORBA::TRANSIENT, ex)
+ catch (const CORBA::TRANSIENT&)
{
// A transient exception exception may be expected,
// so we won't print out the word exception but we
@@ -67,20 +55,18 @@ Test_i::try_and_create_POA (ACE_ENV_SINGLE_ARG_DECL)
"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;
}
void
-Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+Test_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ orb_->shutdown (0);
}