summaryrefslogtreecommitdiff
path: root/TAO/examples/Simple/time-date/Time_Date_Client_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/Simple/time-date/Time_Date_Client_i.cpp')
-rw-r--r--TAO/examples/Simple/time-date/Time_Date_Client_i.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/TAO/examples/Simple/time-date/Time_Date_Client_i.cpp b/TAO/examples/Simple/time-date/Time_Date_Client_i.cpp
index 4d751fcf9fa..5b68548274d 100644
--- a/TAO/examples/Simple/time-date/Time_Date_Client_i.cpp
+++ b/TAO/examples/Simple/time-date/Time_Date_Client_i.cpp
@@ -37,16 +37,13 @@ Time_Date_Client_i::run (const char *name,
if (this->parse_args (argc, argv) == -1)
return -1;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
CORBA::Long l;
// Get the time & date in binary format.
- client_->bin_date (l
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ client_->bin_date (l);
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Binary time_date = %d\n",
@@ -54,9 +51,7 @@ Time_Date_Client_i::run (const char *name,
// Get the time & date in string format.
CORBA::String_var str_var;
- client_->str_date (str_var.out()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ client_->str_date (str_var.out());
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) String time_date = %s\n",
@@ -64,20 +59,16 @@ Time_Date_Client_i::run (const char *name,
client_.shutdown ();
}
- ACE_CATCH (CORBA::UserException, range_ex)
+ catch (const CORBA::UserException& range_ex)
{
- ACE_PRINT_EXCEPTION (range_ex,
- "\tFrom get and set time_date");
+ range_ex._tao_print_exception ("\tFrom get and set time_date");
return -1;
}
- ACE_CATCH (CORBA::SystemException, memex)
+ catch (const CORBA::SystemException& memex)
{
- ACE_PRINT_EXCEPTION (memex,
- "Cannot make time_date");
+ memex._tao_print_exception ("Cannot make time_date");
return -1;
}
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
return 0;
}