summaryrefslogtreecommitdiff
path: root/CIAO/examples/BasicSP/EC/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/examples/BasicSP/EC/client.cpp')
-rw-r--r--CIAO/examples/BasicSP/EC/client.cpp39
1 files changed, 12 insertions, 27 deletions
diff --git a/CIAO/examples/BasicSP/EC/client.cpp b/CIAO/examples/BasicSP/EC/client.cpp
index 2c2f34118bc..62354cbe814 100644
--- a/CIAO/examples/BasicSP/EC/client.cpp
+++ b/CIAO/examples/BasicSP/EC/client.cpp
@@ -18,60 +18,45 @@
int
main (int argc, char *argv[])
{
- ACE_TRY_NEW_ENV
+ try
{
// Initialize orb
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
// Resolve HomeFinder interface
CORBA::Object_var obj
- = orb->string_to_object ("file://ec.ior" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ = orb->string_to_object ("file://ec.ior");
BasicSP::ECHome_var home
- = BasicSP::ECHome::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ = BasicSP::ECHome::_narrow (obj.in ());
if (CORBA::is_nil (home.in ()))
ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire ECHome objref\n"), -1);
BasicSP::EC_var pulser
- = home->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ = home->create ();
// Place to plug in the rate
- pulser->hertz (5
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ pulser->hertz (5);
- pulser->start (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ pulser->start ();
ACE_OS::sleep (45);
- pulser->stop (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ pulser->stop ();
- home->remove_component (pulser.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ home->remove_component (pulser.in ());
- 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,
- "Who is the culprit \n");
+ ex._tao_print_exception ("Who is the culprit \n");
ACE_ERROR_RETURN ((LM_ERROR,
"Uncaught CORBA exception\n"),
1);
}
- ACE_ENDTRY;
return 0;
}