summaryrefslogtreecommitdiff
path: root/TAO/tests/Big_AMI/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Big_AMI/client.cpp')
-rw-r--r--TAO/tests/Big_AMI/client.cpp38
1 files changed, 15 insertions, 23 deletions
diff --git a/TAO/tests/Big_AMI/client.cpp b/TAO/tests/Big_AMI/client.cpp
index 8ee4b1990b0..f018e2c2f84 100644
--- a/TAO/tests/Big_AMI/client.cpp
+++ b/TAO/tests/Big_AMI/client.cpp
@@ -84,8 +84,7 @@ public:
}
void foo (CORBA::Long ami_return_val,
- CORBA::Long out_l
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Long out_l)
ACE_THROW_SPEC ((CORBA::SystemException))
{
++reply_count_;
@@ -98,8 +97,7 @@ public:
}
};
- void foo_excep (::Messaging::ExceptionHolder * excep_holder
- ACE_ENV_ARG_DECL)
+ void foo_excep (::Messaging::ExceptionHolder * excep_holder)
ACE_THROW_SPEC ((CORBA::SystemException))
{
++reply_count_;
@@ -107,16 +105,15 @@ public:
ACE_DEBUG ((LM_DEBUG,
"Callback method <foo_excep> called: \n"
"Testing proper exception handling ...\n"));
- ACE_TRY
+ try
{
excep_holder->raise_exception ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
ACE_DEBUG ((LM_DEBUG,
"... caught the wrong exception -> ERROR\n"));
}
- ACE_ENDTRY;
};
private:
@@ -127,18 +124,17 @@ int
main (int argc, char *argv[])
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
CORBA::Object_var object_var =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa_var =
- PortableServer::POA::_narrow (object_var.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (object_var.in ());
PortableServer::POAManager_var poa_manager_var =
poa_var->the_POAManager ();
@@ -149,10 +145,10 @@ main (int argc, char *argv[])
return 1;
// We reuse the object_var smart pointer!
- object_var = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
+ object_var = orb->string_to_object (ior);
A::AMI_Test_var ami_test_var =
- A::AMI_Test::_narrow (object_var.in () ACE_ENV_ARG_PARAMETER);
+ A::AMI_Test::_narrow (object_var.in ());
if (CORBA::is_nil (ami_test_var.in ()))
{
@@ -188,8 +184,7 @@ main (int argc, char *argv[])
ami_test_var->sendc_foo (the_handler_var.in (),
l,
"Let's talk AMI.",
- payload
- ACE_ENV_ARG_PARAMETER);
+ payload);
}
// We are just sending all requests, but we shouldn't get any replies
@@ -216,8 +211,7 @@ main (int argc, char *argv[])
CORBA::Long number = ami_test_var->foo (l,
l,
"Let's talk SMI.",
- payload
- ACE_ENV_ARG_PARAMETER);
+ payload);
if (debug)
{
@@ -233,17 +227,15 @@ main (int argc, char *argv[])
poa_var->destroy (1, // ethernalize objects
0 // wait for completion
- ACE_ENV_ARG_PARAMETER);
+ );
orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
+ ex._tao_print_exception ("Caught exception:");
return 1;
}
- ACE_ENDTRY;
return 0;
}