summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_1020_Basic_Regression/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Bug_1020_Basic_Regression/client.cpp')
-rw-r--r--TAO/tests/Bug_1020_Basic_Regression/client.cpp41
1 files changed, 14 insertions, 27 deletions
diff --git a/TAO/tests/Bug_1020_Basic_Regression/client.cpp b/TAO/tests/Bug_1020_Basic_Regression/client.cpp
index 9a344d4bfc9..d3f030ae01e 100644
--- a/TAO/tests/Bug_1020_Basic_Regression/client.cpp
+++ b/TAO/tests/Bug_1020_Basic_Regression/client.cpp
@@ -43,19 +43,16 @@ parse_args (int argc, char *argv[])
int
main (int argc, char *argv[])
{
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (poa_object.in ());
if (CORBA::is_nil (root_poa.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -66,12 +63,10 @@ main (int argc, char *argv[])
root_poa->the_POAManager ();
CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("PolicyCurrent");
CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::PolicyCurrent::_narrow (object.in ());
if (CORBA::is_nil (policy_current.in ()))
{
@@ -86,12 +81,10 @@ main (int argc, char *argv[])
policies.length (1);
policies[0] =
orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
+ scope_as_any);
policy_current->set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
+ CORBA::ADD_OVERRIDE);
policies[0]->destroy ();
@@ -115,12 +108,10 @@ main (int argc, char *argv[])
impl->_this ();
CORBA::Object_var tmp =
- orb->string_to_object(ior
- ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object(ior);
Test::Echo_Caller_var server =
- Test::Echo_Caller::_narrow(tmp.in ()
- ACE_ENV_ARG_PARAMETER);
+ Test::Echo_Caller::_narrow(tmp.in ());
if (CORBA::is_nil (echo.in ()))
{
@@ -134,8 +125,7 @@ main (int argc, char *argv[])
Client_Task ctask (orb.in ());
- server->start_task (echo.in()
- ACE_ENV_ARG_PARAMETER);
+ server->start_task (echo.in());
if (ctask.activate (THR_NEW_LWP | THR_JOINABLE,
4,
@@ -153,18 +143,15 @@ main (int argc, char *argv[])
// Actually the code here should never be reached.
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught:");
+ ex._tao_print_exception ("Exception caught:");
return 1;
}
- ACE_ENDTRY;
return 0;
}