summaryrefslogtreecommitdiff
path: root/TAO/tests/Single_Read/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Single_Read/client.cpp')
-rw-r--r--TAO/tests/Single_Read/client.cpp40
1 files changed, 11 insertions, 29 deletions
diff --git a/TAO/tests/Single_Read/client.cpp b/TAO/tests/Single_Read/client.cpp
index 7e69d9350cf..1b6ef1afe6d 100644
--- a/TAO/tests/Single_Read/client.cpp
+++ b/TAO/tests/Single_Read/client.cpp
@@ -71,17 +71,14 @@ parse_args (int argc, char **argv)
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Initialize the ORB.
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ 0);
// Initialize options based on command-line arguments.
int parse_args_result = parse_args (argc, argv);
@@ -90,14 +87,10 @@ main (int argc, char **argv)
// Get an object reference from the argument string.
CORBA::Object_var object =
- orb->string_to_object (IOR
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->string_to_object (IOR);
// Try to narrow the object reference to a <test> reference.
- test_var test_object = test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ test_var test_object = test::_narrow (object.in ());
test::data the_data0 (data_bytes);
the_data0.length (data_bytes);
@@ -118,21 +111,15 @@ main (int argc, char **argv)
// Invoke the oneway method.
test_object->method (i,
- the_data0
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ the_data0);
// Invoke the oneway method.
test_object->method (i,
- the_data1
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ the_data1);
// Invoke the oneway method.
test_object->method (i,
- the_data2
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ the_data2);
}
// Shutdown server.
@@ -140,8 +127,7 @@ main (int argc, char **argv)
{
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Sending a shutdown call..\n"));
- test_object->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ test_object->shutdown ();
}
// Destroy the ORB. On some platforms, e.g., Win32, the socket
@@ -150,18 +136,14 @@ main (int argc, char **argv)
// static destructors to flush the queues, it will be too late.
// Therefore, we use explicit destruction here and flush the
// queues before main() ends.
- 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 caught:");
+ ex._tao_print_exception ("Exception caught:");
return -1;
}
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
return 0;
}