summaryrefslogtreecommitdiff
path: root/TAO/tests/ORB_destroy/ORB_destroy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/ORB_destroy/ORB_destroy.cpp')
-rw-r--r--TAO/tests/ORB_destroy/ORB_destroy.cpp64
1 files changed, 20 insertions, 44 deletions
diff --git a/TAO/tests/ORB_destroy/ORB_destroy.cpp b/TAO/tests/ORB_destroy/ORB_destroy.cpp
index a1d4a89b03e..61ad9caa6d5 100644
--- a/TAO/tests/ORB_destroy/ORB_destroy.cpp
+++ b/TAO/tests/ORB_destroy/ORB_destroy.cpp
@@ -30,49 +30,37 @@ test_with_regular_poa_manager (int argc,
int destroy_orb,
int destroy_poa)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::ORB_init (argc, argv, orb_name);
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->the_POAManager ();
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
if (destroy_poa)
{
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->destroy (1, 1);
}
if (destroy_orb)
{
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->destroy ();
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised");
- ACE_CHECK_RETURN (-1);
+ ex._tao_print_exception ("Exception raised");
}
- ACE_ENDTRY;
return 0;
}
@@ -85,52 +73,40 @@ test_with_funky_poa_manager (int argc,
int destroy_poa,
int funky_poa_manager)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, orb_name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::ORB_init (argc, argv, orb_name);
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ PortableServer::POA::_narrow (obj.in ());
if (funky_poa_manager)
{
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->the_POAManager ();
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
}
if (destroy_poa)
{
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->destroy (1, 1);
}
if (destroy_orb)
{
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->destroy ();
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception raised");
- ACE_CHECK_RETURN (-1);
+ ex._tao_print_exception ("Exception raised");
}
- ACE_ENDTRY;
return 0;
}