summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-01 06:29:22 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-01 06:29:22 +0000
commita994a51c9841a92e5a84519cb261da0497a4de28 (patch)
tree2ac5174de20c62ef28f38eca6219fb607efeab21
parentf49746a93d4e6e49c5b885163f5999f3567728c2 (diff)
downloadATCD-a994a51c9841a92e5a84519cb261da0497a4de28.tar.gz
fixed exception macros and spceifications in Simulator example
-rw-r--r--TAO/ChangeLog-99c17
-rw-r--r--TAO/examples/Simulator/DOVEMIB/AnyAnalyser.cpp48
-rw-r--r--TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp123
-rw-r--r--TAO/examples/Simulator/DOVEMIB/DOVEMIB.h6
-rw-r--r--TAO/examples/Simulator/DOVEMIB/PrintVisitor.cpp8
-rw-r--r--TAO/examples/Simulator/DOVEMIB/any_test_i.cpp12
-rw-r--r--TAO/examples/Simulator/DOVEMIB/clnt.cpp53
-rw-r--r--TAO/examples/Simulator/DOVEMIB/svr.cpp52
-rw-r--r--TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp99
-rw-r--r--TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.h1
-rw-r--r--TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp237
-rw-r--r--TAO/examples/Simulator/Event_Supplier/Event_Con.cpp138
-rw-r--r--TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp26
-rw-r--r--TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp26
14 files changed, 438 insertions, 408 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index f0205bf37d9..d71764dea70 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,20 @@
+Thu Jul 01 00:45:00 1999 Chris Gill <cdgill@cs.wustl.edu>
+
+ * examples/Simulator/DOVEMIB/AnyAnalyser.cpp
+ examples/Simulator/DOVEMIB/DOVEMIB.{cpp, h}
+ examples/Simulator/DOVEMIB/PrintVisitor.cpp
+ examples/Simulator/DOVEMIB/any_test_i.cpp
+ examples/Simulator/DOVEMIB/clnt.cpp
+ examples/Simulator/DOVEMIB/svr.cpp
+ examples/Simulator/Event_Supplier/DOVE_Supplier.{cpp, h}
+ examples/Simulator/Event_Supplier/DualEC_Sup.cpp
+ examples/Simulator/Event_Supplier/Event_Con.cpp
+ examples/Simulator/Event_Supplier/Event_Sup.cpp
+ examples/Simulator/Event_Supplier/Logging_Sup.cpp: Fixed exception
+ specifications and replaced TAO try macros with ACE try macros.
+ Thanks to Randy Heiland <heiland@ncsa.uiuc.edu> for reporting
+ these problems.
+
Wed Jun 30 21:09:34 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* orbsvcs/ImplRepo_Service/Options.cpp:
diff --git a/TAO/examples/Simulator/DOVEMIB/AnyAnalyser.cpp b/TAO/examples/Simulator/DOVEMIB/AnyAnalyser.cpp
index 874c6125781..d8413060366 100644
--- a/TAO/examples/Simulator/DOVEMIB/AnyAnalyser.cpp
+++ b/TAO/examples/Simulator/DOVEMIB/AnyAnalyser.cpp
@@ -16,7 +16,6 @@
// ============================================================================
#include "AnyAnalyser.h"
-#include "tao/Align.h"
ACE_RCSID(DOVEMIB, AnyAnalyser, "$Id$")
@@ -75,12 +74,13 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
CORBA::TypeCode_ptr param;
const unsigned char *start_addr = value_ptr;
- TAO_TRY {
+ ACE_TRY_NEW_ENV
+ {
Node *node_ptr_ = 0;
if (tc_ptr != 0) {
- switch (tc_ptr->kind(TAO_TRY_ENV)) {
+ switch (tc_ptr->kind(ACE_TRY_ENV)) {
case CORBA::tk_struct:
{
@@ -88,10 +88,10 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
start_addr = value_ptr;
// create a new Node
- StructNode *structNode_ptr_ = new StructNode (tc_ptr->name (TAO_TRY_ENV),
+ StructNode *structNode_ptr_ = new StructNode (tc_ptr->name (ACE_TRY_ENV),
ri.recursion_level);
- for (unsigned int i = 0; i < tc_ptr->member_count (TAO_TRY_ENV); i++) {
+ for (unsigned int i = 0; i < tc_ptr->member_count (ACE_TRY_ENV); i++) {
// get the TypeCode pointer to the ith parameter
// and analyse it recursively
@@ -102,16 +102,16 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
// get the type code of the child i
- param = tc_ptr->member_type (i, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ param = tc_ptr->member_type (i, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// get the size
- /* size = */ param->size (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ /* size = */ param->size (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// get the alignment
- alignment = param->alignment (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ alignment = param->alignment (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// calculate
align_offset =
@@ -119,7 +119,7 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
- (ptr_arith_t) value_ptr
+ (ptr_arith_t) ptr_align_binary (start_addr, alignment)
- (ptr_arith_t) start_addr;
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
// if both the start_addr and data are not aligned as per
// the alignment, we do not add the offset
@@ -139,12 +139,12 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
if (ri.kind == PARENT_IS_STRUCT) {
node_ptr_ = (Node *) new DoubleNode ((CORBA::Double *)value_ptr,
ri.parent_tc_ptr->member_name(ri.member_number,
- TAO_TRY_ENV),
+ ACE_TRY_ENV),
ri.recursion_level);
}
else {
node_ptr_ = (Node *) new DoubleNode ((CORBA::Double *)value_ptr,
- tc_ptr->name(TAO_TRY_ENV),
+ tc_ptr->name(ACE_TRY_ENV),
ri.recursion_level);
}
value_ptr += 8;
@@ -154,12 +154,12 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
if (ri.kind == PARENT_IS_STRUCT) {
node_ptr_ = (Node *) new LongNode ((CORBA::Long *)value_ptr,
ri.parent_tc_ptr->member_name(ri.member_number,
- TAO_TRY_ENV),
+ ACE_TRY_ENV),
ri.recursion_level);
}
else {
node_ptr_ = (Node *) new LongNode ((CORBA::Long *)value_ptr,
- tc_ptr->name(TAO_TRY_ENV),
+ tc_ptr->name(ACE_TRY_ENV),
ri.recursion_level);
}
value_ptr += 4;
@@ -169,12 +169,12 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
if (ri.kind == PARENT_IS_STRUCT) {
node_ptr_ = (Node *) new ULongNode ((CORBA::ULong *)value_ptr,
ri.parent_tc_ptr->member_name(ri.member_number,
- TAO_TRY_ENV),
+ ACE_TRY_ENV),
ri.recursion_level);
}
else {
node_ptr_ = (Node *) new ULongNode ((CORBA::ULong *)value_ptr,
- tc_ptr->name(TAO_TRY_ENV),
+ tc_ptr->name(ACE_TRY_ENV),
ri.recursion_level);
}
value_ptr += 4;
@@ -184,12 +184,12 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
if (ri.kind == PARENT_IS_STRUCT) {
node_ptr_ = (Node *) new StringNode (*(CORBA::String_var *)value_ptr,
ri.parent_tc_ptr->member_name(ri.member_number,
- TAO_TRY_ENV),
+ ACE_TRY_ENV),
ri.recursion_level);
}
else {
node_ptr_ = (Node *) new StringNode (*(CORBA::String_var *)value_ptr,
- tc_ptr->name(TAO_TRY_ENV),
+ tc_ptr->name(ACE_TRY_ENV),
ri.recursion_level);
}
value_ptr += 4;
@@ -199,17 +199,17 @@ AnyAnalyser::analyse (CORBA::TypeCode_ptr tc_ptr,
exit (1);
break;
}
- TAO_CHECK_ENV;
- return node_ptr_;
+ ACE_TRY_CHECK;
+ return node_ptr_;
}
else {
ACE_DEBUG ((LM_ERROR, "AnyAnalyser::analyse: TypeCode pointer to member was Null!\n"));
}
}
- TAO_CATCHANY {
+ ACE_CATCHANY {
ACE_ERROR ((LM_ERROR, "(%t)AnyAnalyser::analyse: Error in analysing the any.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp b/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp
index ded0f6c359c..726228024cc 100644
--- a/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp
+++ b/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp
@@ -50,7 +50,8 @@ MIB_Consumer::MIB_Consumer (void)
int
MIB_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
const char *my_name) {
- TAO_TRY {
+ ACE_TRY_NEW_ENV
+ {
// Get a Scheduler.
RtecScheduler::Scheduler_ptr server =
@@ -58,19 +59,19 @@ MIB_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
// Define Real-time information.
- rt_info_ = server->create (my_name, TAO_TRY_ENV);
+ rt_info_ = server->create (my_name, ACE_TRY_ENV);
server->set (rt_info_,
- RtecScheduler::VERY_LOW_CRITICALITY,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- 2500000,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- RtecScheduler::OPERATION,
- TAO_TRY_ENV);
+ RtecScheduler::VERY_LOW_CRITICALITY,
+ ORBSVCS_Time::zero (),
+ ORBSVCS_Time::zero (),
+ ORBSVCS_Time::zero (),
+ 2500000,
+ RtecScheduler::VERY_LOW_IMPORTANCE,
+ ORBSVCS_Time::zero (),
+ 1,
+ RtecScheduler::OPERATION,
+ ACE_TRY_ENV);
// Create the event that we're registering for.
@@ -86,44 +87,45 @@ MIB_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
// = Connect as a consumer.
- this->consumer_admin_ = channel_admin_->for_consumers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->consumer_admin_ = channel_admin_->for_consumers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Obtain a pointer to a push supplier. "suppliers" is
// inherited from a base class.
- this->suppliers_ = consumer_admin_->obtain_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->suppliers_ = consumer_admin_->obtain_push_supplier (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// The _this function returns an object pointer. This is needed
// because a consumer inherits from a Servant class that is no
// CORBA::Object.
- RtecEventComm::PushConsumer_var objref = this->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ RtecEventComm::PushConsumer_var objref = this->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->suppliers_->connect_push_consumer (objref.in (),
dependencies.get_ConsumerQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se) {
+ ACE_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se) {
ACE_ERROR_RETURN ((LM_ERROR,
"MIB_Consumer::open: subscribe failed.\n"),
-1);
}
- TAO_CATCHANY {
+ ACE_CATCHANY {
ACE_ERROR_RETURN ((LM_ERROR,
"MIB_Consumer::open: unexpected exception.\n"),
-1);
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
void
-MIB_Consumer::disconnect_push_consumer (CORBA::Environment &)
+MIB_Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
"Consumer received disconnect from channel.\n"));
@@ -135,7 +137,8 @@ MIB_Consumer::disconnect_push_consumer (CORBA::Environment &)
void
MIB_Consumer::push (const RtecEventComm::EventSet &events,
- CORBA::Environment &)
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
if (events.length () == 0) {
@@ -165,7 +168,7 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events,
ACE_DEBUG ((LM_DEBUG, "MIB Consumer: received an event, going to be mute.\n"));
}
- TAO_TRY
+ ACE_TRY
{
// print the time stamps
ACE_hrtime_t creation;
@@ -184,10 +187,10 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events,
if (events[i].data.any_value.any_owns_data ())
{
- void * void_ptr = ACE_OS::malloc (events[i].data.any_value.type()->size(TAO_TRY_ENV));
+ void * void_ptr = ACE_OS::malloc (events[i].data.any_value.type()->size(ACE_TRY_ENV));
TAO_InputCDR stream ((ACE_Message_Block *)events[i].data.any_value.value ());
- if (stream.decode (events[i].data.any_value.type(), void_ptr, 0, TAO_TRY_ENV)
+ if (stream.decode (events[i].data.any_value.type(), void_ptr, 0, ACE_TRY_ENV)
!= CORBA::TypeCode::TRAVERSE_CONTINUE)
{
cout << "MIB_Consumer::push: "
@@ -197,7 +200,7 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events,
ACE_OS::free(void_ptr);
return;
}
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
// invoke the AnyAnalyser
anyAnalyser_.printAny (events[i].data.any_value.type(), void_ptr);
@@ -210,10 +213,10 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events,
}
}
- TAO_CATCHANY {
+ ACE_CATCHANY {
ACE_ERROR ((LM_ERROR, "(%t)Error in extracting the Navigation and Weapons data.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
}
}
@@ -221,29 +224,29 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events,
void
MIB_Consumer::shutdown (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// cause the AnyAnalyser to close the file
anyAnalyser_.close();
// Disconnect from the push supplier.
- this->suppliers_->disconnect_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->suppliers_->disconnect_push_supplier (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "@@ we should shutdown here!!!\n"));
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
ec = 0;
TAO_ORB_Core_instance ()->orb ()->shutdown ();
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR,
"(%t) MIB_Consumer::shutdown: unexpected exception.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
// function get_options
@@ -314,13 +317,13 @@ get_options (int argc, char *argv [])
int
main (int argc, char *argv [])
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Initialize ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CORBA::ORB_init (argc, argv, "internet", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::Object_var poa_object =
orb->resolve_initial_references("RootPOA");
@@ -331,12 +334,12 @@ main (int argc, char *argv [])
1);
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ root_poa->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::Object_var naming_obj =
orb->resolve_initial_references ("NameService");
@@ -348,8 +351,8 @@ main (int argc, char *argv [])
CosNaming::NamingContext_var naming_context =
CosNaming::NamingContext::_narrow (naming_obj.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_Scheduler_Factory::use_config (naming_context.in ());
@@ -364,12 +367,12 @@ main (int argc, char *argv [])
CORBA::Object_var ec_obj =
naming_context->resolve (channel_name,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ec =
- RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in(), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in(), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (ec.ptr() == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -384,13 +387,13 @@ main (int argc, char *argv [])
-1);
if (mIB_Consumer->open_consumer (ec.ptr (),
- "MIB_Consumer") == -1)
+ "MIB_Consumer") == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Someone was feeling introverted.\n"),
-1);
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ poa_manager->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Run the ORB
@@ -399,21 +402,21 @@ main (int argc, char *argv [])
"%p\n",
"CORBA::ORB::run"),
-1);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
ec = 0;
root_poa->destroy (1,
1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/examples/Simulator/DOVEMIB/DOVEMIB.h b/TAO/examples/Simulator/DOVEMIB/DOVEMIB.h
index 90c6a1db6db..f15847160d1 100644
--- a/TAO/examples/Simulator/DOVEMIB/DOVEMIB.h
+++ b/TAO/examples/Simulator/DOVEMIB/DOVEMIB.h
@@ -36,12 +36,14 @@ public:
// supplier. Stores <my_name> for printing out messages. Returns 0
// on success, -1 on failure.
- virtual void disconnect_push_consumer (CORBA::Environment &);
+ virtual void disconnect_push_consumer (CORBA::Environment &)
+ ACE_THROW_SPEC ((CORBA::SystemException));
// The channel is disconnecting.
// = (not protected to allow short-circuiting) protected:
virtual void push (const RtecEventComm::EventSet &events,
- CORBA::Environment &);
+ CORBA::Environment &)
+ ACE_THROW_SPEC ((CORBA::SystemException));
// If the <events>[0] is a notification, prints out the data from
// the supplier. If its a shutdown message, the consumer
// disconnects from the channel.
diff --git a/TAO/examples/Simulator/DOVEMIB/PrintVisitor.cpp b/TAO/examples/Simulator/DOVEMIB/PrintVisitor.cpp
index e76688418cd..c350f05783d 100644
--- a/TAO/examples/Simulator/DOVEMIB/PrintVisitor.cpp
+++ b/TAO/examples/Simulator/DOVEMIB/PrintVisitor.cpp
@@ -21,10 +21,10 @@ ACE_RCSID(DOVEMIB, PrintVisitor, "$Id$")
PrintVisitor::PrintVisitor (const char *file_name) {
- TAO_TRY {
+ ACE_TRY {
if (file_name != 0) {
output_ = ACE_OS::fopen(file_name, "w");
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
// print it on the screen if file could be opened
if (output_ == 0) {
@@ -45,11 +45,11 @@ PrintVisitor::PrintVisitor (const char *file_name) {
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR, "Failing when trying to open the output file.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
diff --git a/TAO/examples/Simulator/DOVEMIB/any_test_i.cpp b/TAO/examples/Simulator/DOVEMIB/any_test_i.cpp
index d6d0e98cc5c..d33b6f8c888 100644
--- a/TAO/examples/Simulator/DOVEMIB/any_test_i.cpp
+++ b/TAO/examples/Simulator/DOVEMIB/any_test_i.cpp
@@ -33,15 +33,15 @@ Any_Test_i::~Any_Test_i (void)
void
Any_Test_i::try_an_any (const CORBA::Any &a, CORBA::Environment &env)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
ACE_DEBUG ((LM_DEBUG, "Call to try_an_any succeeded!\n"));
AnyAnalyser anyAnalyser_ = AnyAnalyser ("stdout");
+ ACE_TRY_CHECK;
- TAO_CHECK_ENV;
Weapons *weapons_ = 0;
- if (a.type()->equal(_tc_Weapons,TAO_TRY_ENV)) {
+ if (a.type()->equal(_tc_Weapons, ACE_TRY_ENV)) {
CORBA::Any b;
b = a;
@@ -51,7 +51,7 @@ Any_Test_i::try_an_any (const CORBA::Any &a, CORBA::Environment &env)
"ID: %d\n" "CompTime: %d\n"
"Adr number of weapons: %d\n"
"Adr CompTime: %d\n",
- a.type()->id(TAO_TRY_ENV),
+ a.type()->id(ACE_TRY_ENV),
weapons_->computation_time,
(u_long)(void *) &(weapons_->number_of_weapons),
(u_long)(void *) &(weapons_->computation_time)));
@@ -59,11 +59,11 @@ Any_Test_i::try_an_any (const CORBA::Any &a, CORBA::Environment &env)
anyAnalyser_.printAny (a.type(), a.value());
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR, "(%t)Error in extracting the data.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
diff --git a/TAO/examples/Simulator/DOVEMIB/clnt.cpp b/TAO/examples/Simulator/DOVEMIB/clnt.cpp
index 6511a42d177..95fe3d7e5c7 100644
--- a/TAO/examples/Simulator/DOVEMIB/clnt.cpp
+++ b/TAO/examples/Simulator/DOVEMIB/clnt.cpp
@@ -35,7 +35,8 @@ int
Any_Test_Client::init (int argc, char *argv [])
{
- TAO_TRY {
+ ACE_TRY_NEW_ENV
+ {
this->argc_ = argc;
this->argv_ = argv;
@@ -43,19 +44,19 @@ Any_Test_Client::init (int argc, char *argv [])
this->orb_ = CORBA::ORB_init (this->argc_,
this->argv_,
"internet",
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (this->argc_ != 2)
{
ACE_ERROR_RETURN ((LM_ERROR, "Expected an IOR as parameter\n"),-1);
}
- CORBA::Object_var any_test_object_ = this->orb_->string_to_object (argv_[1], TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CORBA::Object_var any_test_object_ = this->orb_->string_to_object (argv_[1], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- this->any_test_ptr_ = Any_Test::_narrow (any_test_object_.in(), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->any_test_ptr_ = Any_Test::_narrow (any_test_object_.in(), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (CORBA::is_nil (this->any_test_ptr_))
{
@@ -65,18 +66,18 @@ Any_Test_Client::init (int argc, char *argv [])
}
return 0;
}
- TAO_CATCHANY {
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_CATCHANY {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
return 0;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
int
Any_Test_Client::run ()
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
CORBA::Any data;
@@ -94,7 +95,7 @@ Any_Test_Client::run ()
navigation_.completion_time = 5;
navigation_.computation_time = 6;
- data.replace (_tc_Navigation, &navigation_, 0, TAO_TRY_ENV);
+ data.replace (_tc_Navigation, &navigation_, 0, ACE_TRY_ENV);
ACE_DEBUG ((LM_DEBUG,"Starting test with Any: Navigation\n"));
//any_test_ptr_->try_an_any (data, TAO_TRY_ENV);
@@ -133,18 +134,18 @@ Any_Test_Client::run ()
weapons_.completion_time = 5;
weapons_.computation_time = 6;
- data.replace (_tc_Weapons, &weapons_, 0, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ data.replace (_tc_Weapons, &weapons_, 0, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,"Starting test with Any: Weapons\n"));
- any_test_ptr_->try_an_any (data, TAO_TRY_ENV);
+ any_test_ptr_->try_an_any (data, ACE_TRY_ENV);
ACE_DEBUG ((LM_DEBUG,"Ending test with Any: Weapons\n"));
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("Error in Any_Test_Client::run");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Error in Any_Test_Client::run");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
@@ -158,25 +159,23 @@ int
main (int argc, char *argv [])
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
Any_Test_Client any_test_client_;
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
if (any_test_client_.init (argc, argv) == -1)
return 1;
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
return any_test_client_.run ();
- TAO_CHECK_ENV;
-
-
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
diff --git a/TAO/examples/Simulator/DOVEMIB/svr.cpp b/TAO/examples/Simulator/DOVEMIB/svr.cpp
index f894464cf9f..650b0f12954 100644
--- a/TAO/examples/Simulator/DOVEMIB/svr.cpp
+++ b/TAO/examples/Simulator/DOVEMIB/svr.cpp
@@ -61,10 +61,10 @@ main (int argc, char *argv[])
structNode_ptr_->print ();
*/
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Having the ORB\n"));
@@ -77,21 +77,21 @@ main (int argc, char *argv[])
1);
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ root_poa->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::PolicyList policies (2);
policies.length (2);
policies[0] =
root_poa->create_id_assignment_policy (PortableServer::USER_ID,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
policies[1] =
root_poa->create_lifespan_policy (PortableServer::PERSISTENT,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
ACE_DEBUG ((LM_DEBUG, "Having the rootPOA\n"));
@@ -101,8 +101,8 @@ main (int argc, char *argv[])
root_poa->create_POA ("child_poa",
poa_manager.in (),
policies,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Parse remaining command line and verify parameters.
parse_args (argc, argv);
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
// create a factory implementation
Any_Test_i_ptr any_test_i_ptr_ = new Any_Test_i ();
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Started the implementation\n"));
@@ -119,26 +119,26 @@ main (int argc, char *argv[])
PortableServer::string_to_ObjectId ("Any_Test");
good_poa->activate_object_with_id (id.in (),
any_test_i_ptr_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Stringify the objref we'll be implementing, and print it to
// stdout. Someone will take that string and give it to a
// client. Then release the object.
CORBA::Object_var obj =
- good_poa->id_to_reference (id.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ good_poa->id_to_reference (id.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::String_var str =
orb->object_to_string (obj.in (),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
ACE_DEBUG ((LM_DEBUG,
"The IOR is: <%s>\n", str.in ()));
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ poa_manager->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Handle requests for this object until we're killed, or one of
// the methods asks us to exit.
@@ -147,22 +147,22 @@ main (int argc, char *argv[])
root_poa->destroy (1,
1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCH (CORBA::SystemException, sysex)
{
ACE_UNUSED_ARG(sysex);
- TAO_TRY_ENV.print_exception ("System Exception");
+ ACE_PRINT_EXCEPTION (sysex, "System Exception");
return -1;
}
- TAO_CATCH (CORBA::UserException, userex)
+ ACE_CATCH (CORBA::UserException, userex)
{
ACE_UNUSED_ARG(userex);
- TAO_TRY_ENV.print_exception ("User Exception");
+ ACE_PRINT_EXCEPTION (userex, "User Exception");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
index 4b2713fd8b6..de2ba4e47c2 100644
--- a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
@@ -66,7 +66,7 @@ DOVE_Supplier::~DOVE_Supplier ()
int
DOVE_Supplier::init (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Connect to the RootPOA.
CORBA::Object_var poaObject_var =
@@ -78,12 +78,12 @@ DOVE_Supplier::init (void)
-1);
this->root_POA_var_ =
- PortableServer::POA::_narrow (poaObject_var.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ PortableServer::POA::_narrow (poaObject_var.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->poa_manager_ =
- root_POA_var_->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ root_POA_var_->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Get the Naming Service object reference.
CORBA::Object_var namingObj_var =
@@ -96,15 +96,16 @@ DOVE_Supplier::init (void)
this->namingContext_var_ =
CosNaming::NamingContext::_narrow (namingObj_var.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DOVE_Supplier::init");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DOVE_Supplier::init");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
initialized_ = 1;
return 0;
@@ -248,7 +249,7 @@ DOVE_Supplier::notify (CORBA::Any &message)
this->connected ();
}
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
RtecEventComm::Event event;
event.header.source = SOURCE_ID;
@@ -266,16 +267,16 @@ DOVE_Supplier::notify (CORBA::Any &message)
// Now we invoke a RPC
this->current_connection_params_->proxyPushConsumer_var_->push (events,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR,
"DOVE_Supplier::notify: "
"unexpected exception.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
@@ -327,7 +328,7 @@ DOVE_Supplier::Internal_DOVE_Supplier::Internal_DOVE_Supplier (DOVE_Supplier *im
int
DOVE_Supplier::get_Scheduler ()
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
CosNaming::Name schedule_name (1);
schedule_name.length (1);
@@ -336,15 +337,15 @@ DOVE_Supplier::get_Scheduler ()
CORBA::Object_var objref =
namingContext_var_->resolve (schedule_name,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->current_connection_params_->scheduler_var_ =
RtecScheduler::Scheduler::_narrow(objref.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
current_connection_params_->scheduler_var_ = 0;
ACE_ERROR_RETURN ((LM_ERROR,
@@ -353,7 +354,7 @@ DOVE_Supplier::get_Scheduler ()
this->current_connection_params_->ss_name_),
-1);
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -362,7 +363,7 @@ DOVE_Supplier::get_Scheduler ()
int
DOVE_Supplier::get_EventChannel ()
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Get a reference to the Event Service
CosNaming::Name channel_name (1);
@@ -371,25 +372,26 @@ DOVE_Supplier::get_EventChannel ()
CORBA::string_dup (this->current_connection_params_->es_name_);
CORBA::Object_var eventServiceObj_var =
- this->namingContext_var_->resolve (channel_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->namingContext_var_->resolve (channel_name, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->current_connection_params_->eventChannel_var_ =
RtecEventChannelAdmin::EventChannel::_narrow (eventServiceObj_var.in(),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (CORBA::is_nil (this->current_connection_params_->eventChannel_var_.in()))
ACE_ERROR_RETURN ((LM_ERROR,
"The reference to the event channel is nil!"),
1);
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DOVE_Supplier::get_EventChannel");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DOVE_Supplier::get_EventChannel");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -398,16 +400,16 @@ DOVE_Supplier::get_EventChannel ()
int
DOVE_Supplier::connect_Supplier ()
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Generate the Real-time information descriptor.
this->current_connection_params_->rt_info_ =
this->current_connection_params_->
scheduler_var_->
create (this->current_connection_params_->pod_rt_info_.entry_point,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->current_connection_params_->scheduler_var_->
set (this->current_connection_params_->rt_info_,
@@ -423,9 +425,9 @@ DOVE_Supplier::connect_Supplier ()
this->current_connection_params_->pod_rt_info_.threads,
ACE_static_cast (RtecScheduler::Info_Type_t,
this->current_connection_params_->pod_rt_info_.info_type),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
// Set the publications to report them to the event channel.
@@ -442,41 +444,42 @@ DOVE_Supplier::connect_Supplier ()
qos.publications[0].event.data.any_value.replace (CORBA::_tc_short,
&x,
0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
qos.publications[0].dependency_info.number_of_calls = 1;
qos.publications[0].dependency_info.rt_info =
this->current_connection_params_->rt_info_;
// = Connect as a supplier.
this->current_connection_params_->supplierAdmin_var_ =
- this->current_connection_params_->eventChannel_var_->for_suppliers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->current_connection_params_->eventChannel_var_->for_suppliers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->current_connection_params_->proxyPushConsumer_var_ =
- this->current_connection_params_->supplierAdmin_var_->obtain_push_consumer (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->current_connection_params_->supplierAdmin_var_->obtain_push_consumer (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// In calling _this we get back an object reference and register
// the servant with the POA.
RtecEventComm::PushSupplier_var pushSupplier_var =
- this->internal_DOVE_Supplier_ptr_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->internal_DOVE_Supplier_ptr_->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Connect the supplier to the proxy consumer.
ACE_SupplierQOS_Factory::debug (qos);
this->current_connection_params_->
proxyPushConsumer_var_->connect_push_supplier (pushSupplier_var.in (),
qos,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DOVE_Supplier::connect_supplier");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DOVE_Supplier::connect_supplier");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
diff --git a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.h b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.h
index 05c1d68dd39..1e65742113d 100644
--- a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.h
+++ b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.h
@@ -78,6 +78,7 @@ private:
public:
virtual void disconnect_push_supplier (CORBA::Environment &)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
}
diff --git a/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
index 87c6c01e5ca..feed16d3360 100644
--- a/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
@@ -78,33 +78,34 @@ DualEC_Supplier::DualEC_Supplier (int argc, char** argv)
nav_roll_ (0),
nav_pitch_ (0)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
this->sched_hi_name_.length (1);
this->sched_hi_name_[0].id = CORBA::string_dup ("DUAL_SCHED_HI");
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_lo_name_.length (1);
this->sched_lo_name_[0].id = CORBA::string_dup ("DUAL_SCHED_LO");
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->channel_hi_name_.length (1);
this->channel_hi_name_[0].id = CORBA::string_dup ("DUAL_EC_HI");
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->channel_lo_name_.length (1);
this->channel_lo_name_[0].id = CORBA::string_dup ("DUAL_EC_LO");
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
- this->terminator_ = terminator_impl_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->terminator_ = terminator_impl_._this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DualEC_Supplier::DualEC_Supplier : could "
- "not resolve reference to terminator");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DualEC_Supplier::DualEC_Supplier : could "
+ "not resolve reference to terminator");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
// Initialize the high priority RT_Info data
rt_info_nav_hi_.entry_point = "DUALEC_NAV_HI";
@@ -141,28 +142,29 @@ DualEC_Supplier::DualEC_Supplier (int argc, char** argv)
DualEC_Supplier::~DualEC_Supplier ()
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
this->navigation_Supplier_.disconnect ();
this->weapons_Supplier_.disconnect ();
// Unbind the schedulers from the NS.
- this->naming_context_->unbind (this->sched_hi_name_, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- this->naming_context_->unbind (this->sched_lo_name_, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->naming_context_->unbind (this->sched_hi_name_, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ this->naming_context_->unbind (this->sched_lo_name_, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Unbind the ECs from the NS.
- this->naming_context_->unbind (this->channel_hi_name_, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- this->naming_context_->unbind (this->channel_lo_name_, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->naming_context_->unbind (this->channel_hi_name_, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ this->naming_context_->unbind (this->channel_lo_name_, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DualEC_Supplier::~DualEC_Supplier");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DualEC_Supplier::~DualEC_Supplier");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
// @@TBD - destroy the ECs
// @@TBD - destroy the schedulers
@@ -173,7 +175,7 @@ DualEC_Supplier::init ()
{
this->get_options (argc_, argv_);
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Connect to the RootPOA.
CORBA::Object_var poaObject_var =
@@ -185,12 +187,12 @@ DualEC_Supplier::init ()
1);
this->root_POA_var_ =
- PortableServer::POA::_narrow (poaObject_var.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ PortableServer::POA::_narrow (poaObject_var.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->poa_manager_ =
- root_POA_var_->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ root_POA_var_->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Get the Naming Service object reference.
CORBA::Object_var namingObj_var =
@@ -203,16 +205,17 @@ DualEC_Supplier::init ()
this->naming_context_ =
CosNaming::NamingContext::_narrow (namingObj_var.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DualEC_Supplier::init");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DualEC_Supplier::init");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
// Create two scheduling service instances.
if (this->create_schedulers () == -1)
@@ -286,16 +289,16 @@ DualEC_Supplier::init ()
// Private class that implements a termination servant.
void
-DualEC_Supplier::Terminator::shutdown (CORBA::Environment &_env)
+DualEC_Supplier::Terminator::shutdown (CORBA::Environment &ACE_TRY_ENV)
{
- TAO_TRY
+ ACE_TRY
{
TAO_ORB_Core_instance ()->orb ()->shutdown ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
@@ -304,14 +307,14 @@ DualEC_Supplier::Terminator::shutdown (CORBA::Environment &_env)
void *
DualEC_Supplier::run_orb (void *)
{
- TAO_TRY
+ ACE_TRY
{
TAO_ORB_Core_instance ()->orb ()->run ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -325,7 +328,7 @@ DualEC_Supplier::run_nav_thread (void *arg)
DualEC_Supplier * sup =
ACE_static_cast (DualEC_Supplier *, arg);
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
ACE_Unbounded_Queue_Iterator<Navigation *>
nav_iter (sup->navigation_data_);
@@ -348,7 +351,7 @@ DualEC_Supplier::run_nav_thread (void *arg)
if ((nav_iter.next (nav)) && (nav) && (*nav))
{
- any.replace (_tc_Navigation, *nav, 0, TAO_TRY_ENV);
+ any.replace (_tc_Navigation, *nav, 0, ACE_TRY_ENV);
// Sleep briefly to avoid too much livelock (a little is good).
ACE_OS::sleep (sup->nav_pause_);
@@ -389,10 +392,10 @@ DualEC_Supplier::run_nav_thread (void *arg)
while (++total_sent < sup->total_messages_);
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -406,7 +409,7 @@ DualEC_Supplier::run_weap_thread (void *arg)
DualEC_Supplier * sup =
ACE_static_cast (DualEC_Supplier *, arg);
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
ACE_Unbounded_Queue_Iterator<Weapons *>
weap_iter (sup->weapons_data_);
@@ -429,7 +432,7 @@ DualEC_Supplier::run_weap_thread (void *arg)
if ((weap_iter.next (weap)) && (weap) && (*weap))
{
- any.replace (_tc_Weapons, *weap, 0, TAO_TRY_ENV);
+ any.replace (_tc_Weapons, *weap, 0, ACE_TRY_ENV);
// Sleep briefly to avoid too much livelock (a little is good).
ACE_OS::sleep (sup->weap_pause_);
@@ -459,10 +462,10 @@ DualEC_Supplier::run_weap_thread (void *arg)
while (++total_sent < sup->total_messages_);
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -479,7 +482,7 @@ DualEC_Supplier::create_schedulers (void)
// create either a runtime or a config scheduler for
// each instance
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
if (use_runtime_schedulers_)
{
@@ -496,25 +499,25 @@ DualEC_Supplier::create_schedulers (void)
ACE_Config_Scheduler,
-1);
- this->sched_hi_ = sched_hi_impl_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->sched_hi_ = sched_hi_impl_->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_NEW_RETURN (this->sched_lo_impl_,
ACE_Config_Scheduler,
-1);
- this->sched_lo_ = sched_lo_impl_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->sched_lo_ = sched_lo_impl_->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Register Scheduling Service Implementations with Naming Service
this->naming_context_->bind (this ->sched_hi_name_,
- this->sched_hi_.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->sched_hi_.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
naming_context_->bind (this->sched_lo_name_,
- this->sched_lo_.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->sched_lo_.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Register high and low priority rt_infos with the
// schedulers to force priority differentiation.
@@ -522,9 +525,9 @@ DualEC_Supplier::create_schedulers (void)
this->sched_hi_rt_info_hi_ =
this->sched_hi_->
create (this->rt_info_dummy_hi_.entry_point,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_hi_->
set (this->sched_hi_rt_info_hi_,
@@ -540,16 +543,16 @@ DualEC_Supplier::create_schedulers (void)
this->rt_info_dummy_hi_.threads,
ACE_static_cast (RtecScheduler::Info_Type_t,
this->rt_info_dummy_hi_.info_type),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_hi_rt_info_lo_ =
this->sched_hi_->
create (this->rt_info_dummy_lo_.entry_point,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_hi_->
set (this->sched_hi_rt_info_lo_,
@@ -565,16 +568,16 @@ DualEC_Supplier::create_schedulers (void)
this->rt_info_dummy_lo_.threads,
ACE_static_cast (RtecScheduler::Info_Type_t,
this->rt_info_dummy_lo_.info_type),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_hi_rt_info_hi_ =
this->sched_lo_->
create (this->rt_info_dummy_hi_.entry_point,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_lo_->
set (this->sched_hi_rt_info_hi_,
@@ -590,16 +593,16 @@ DualEC_Supplier::create_schedulers (void)
this->rt_info_dummy_hi_.threads,
ACE_static_cast (RtecScheduler::Info_Type_t,
this->rt_info_dummy_hi_.info_type),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_hi_rt_info_lo_ =
this->sched_lo_->
create (this->rt_info_dummy_lo_.entry_point,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
this->sched_lo_->
set (this->sched_hi_rt_info_lo_,
@@ -615,18 +618,19 @@ DualEC_Supplier::create_schedulers (void)
this->rt_info_dummy_lo_.threads,
ACE_static_cast (RtecScheduler::Info_Type_t,
this->rt_info_dummy_lo_.info_type),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DualEC_Supplier::create_schedulers");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DualEC_Supplier::create_schedulers");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -638,7 +642,7 @@ DualEC_Supplier::create_schedulers (void)
int
DualEC_Supplier::create_event_channels (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Create Event Service Implementations, passing in the respective
// Scheduling Service Implementations (which must already be created).
@@ -649,8 +653,8 @@ DualEC_Supplier::create_event_channels (void)
&default_module_factory_),
-1);
- this->ec_hi_ = ec_hi_impl_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->ec_hi_ = ec_hi_impl_->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_NEW_RETURN (this->ec_lo_impl_,
ACE_EventChannel (sched_lo_.in (),
@@ -659,26 +663,27 @@ DualEC_Supplier::create_event_channels (void)
&default_module_factory_),
-1);
- this->ec_lo_ = ec_lo_impl_->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->ec_lo_ = ec_lo_impl_->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Register Event Service Implementations with Naming Service
naming_context_->bind (this->channel_hi_name_,
- this->ec_hi_.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->ec_hi_.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
naming_context_->bind (this->channel_lo_name_,
- this->ec_lo_.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->ec_lo_.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("DualEC_Supplier::create_event_channels");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "DualEC_Supplier::create_event_channels");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -686,7 +691,7 @@ DualEC_Supplier::create_event_channels (void)
void
DualEC_Supplier::compute_schedules (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
#if defined (__SUNPRO_CC)
// Sun C++ 4.2 warns with the code below:
@@ -708,8 +713,8 @@ DualEC_Supplier::compute_schedules (void)
ACE_SCOPE_THREAD),
ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
ACE_SCOPE_THREAD),
- infos_out_hi, configs_out_hi, anomalies_out_hi, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ infos_out_hi, configs_out_hi, anomalies_out_hi, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
RtecScheduler::RT_Info_Set_out infos_out_lo (this->infos_lo_);
RtecScheduler::Config_Info_Set_out configs_out_lo (this->configs_lo_);
@@ -719,8 +724,8 @@ DualEC_Supplier::compute_schedules (void)
ACE_SCOPE_THREAD),
ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
ACE_SCOPE_THREAD),
- infos_out_lo, configs_out_lo, anomalies_out_lo, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ infos_out_lo, configs_out_lo, anomalies_out_lo, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
#else /* ! __SUNPRO_CC */
@@ -730,8 +735,8 @@ DualEC_Supplier::compute_schedules (void)
ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
ACE_SCOPE_THREAD),
this->infos_hi_.out (), this->configs_hi_.out (),
- this->anomalies_hi_.out (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->anomalies_hi_.out (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
sched_lo_->compute_scheduling
(ACE_Sched_Params::priority_min (ACE_SCHED_FIFO,
@@ -739,8 +744,8 @@ DualEC_Supplier::compute_schedules (void)
ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
ACE_SCOPE_THREAD),
this->infos_lo_.out (), this->configs_lo_.out (),
- this->anomalies_lo_.out (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->anomalies_lo_.out (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
#endif /* ! __SUNPRO_CC */
@@ -750,7 +755,7 @@ DualEC_Supplier::compute_schedules (void)
configs_hi_.in (),
anomalies_hi_.in (),
this->hi_schedule_file_name_);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
if (dump_schedule_headers_ && (this->lo_schedule_file_name_ != 0))
@@ -759,24 +764,24 @@ DualEC_Supplier::compute_schedules (void)
configs_lo_.in (),
anomalies_lo_.in (),
this->lo_schedule_file_name_);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
DualEC_Supplier::start_generating_events (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Activate the POA manager.
- poa_manager_->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ poa_manager_->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Spawn a thread that runs the orb event loop
ACE_Thread_Manager orb_thread_manager;
@@ -811,7 +816,7 @@ DualEC_Supplier::start_generating_events (void)
// Shut down the ORB via the termination servant
this->terminator_->shutdown ();
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
// Wait for the thread that runs the orb event loop.
orb_thread_manager.wait ();
@@ -836,11 +841,11 @@ DualEC_Supplier::start_generating_events (void)
if (weap_iter.next (weap_temp) && weap_temp)
delete (*weap_temp);
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
@@ -1147,15 +1152,15 @@ main (int argc, char *argv [])
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Initialize ORB.
TAO_ORB_Manager orb_Manager;
orb_Manager.init (argc,
argv,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Create the demo supplier.
@@ -1174,13 +1179,13 @@ main (int argc, char *argv [])
// when done, we clean up
delete event_Supplier_ptr;
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
index 5ada49615e9..4bbacabce77 100644
--- a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
@@ -57,7 +57,7 @@ int
Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
const char *my_name)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Get a Scheduler.
@@ -66,19 +66,19 @@ Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
// Define Real-time information.
- rt_info_ = server->create (my_name, TAO_TRY_ENV);
+ rt_info_ = server->create (my_name, ACE_TRY_ENV);
server->set (rt_info_,
- RtecScheduler::VERY_LOW_CRITICALITY,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- ORBSVCS_Time::zero,
- 2500000,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- ORBSVCS_Time::zero,
- 1,
- RtecScheduler::OPERATION,
- TAO_TRY_ENV);
+ RtecScheduler::VERY_LOW_CRITICALITY,
+ ORBSVCS_Time::zero (),
+ ORBSVCS_Time::zero (),
+ ORBSVCS_Time::zero (),
+ 2500000,
+ RtecScheduler::VERY_LOW_IMPORTANCE,
+ ORBSVCS_Time::zero (),
+ 1,
+ RtecScheduler::OPERATION,
+ ACE_TRY_ENV);
// Create the event that we're registering for.
@@ -96,48 +96,48 @@ Demo_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
// = Connect as a consumer.
this->consumer_admin_ =
- channel_admin_->for_consumers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ channel_admin_->for_consumers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Obtain a pointer to a push supplier. "suppliers" is
// inherited from a base class.
this->suppliers_ =
- consumer_admin_->obtain_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ consumer_admin_->obtain_push_supplier (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// The _this function returns an object pointer. This is needed
// because a consumer inherits from a Servant class that is no
// CORBA::Object.
RtecEventComm::PushConsumer_var objref =
- this->_this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->_this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->suppliers_->connect_push_consumer (objref.in (),
dependencies.get_ConsumerQOS (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se)
+ ACE_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se)
{
ACE_ERROR_RETURN ((LM_ERROR,
"Demo_Consumer::open: subscribe failed.\n"),
-1);
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR_RETURN ((LM_ERROR,
"Demo_Consumer::open: unexpected exception.\n"),
-1);
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
void
-Demo_Consumer::disconnect_push_consumer (CORBA::Environment &)
+Demo_Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV)
{
ACE_DEBUG ((LM_DEBUG,
"Consumer received disconnect from channel.\n"));
@@ -145,7 +145,7 @@ Demo_Consumer::disconnect_push_consumer (CORBA::Environment &)
void
Demo_Consumer::push (const RtecEventComm::EventSet &events,
- CORBA::Environment &)
+ CORBA::Environment &ACE_TRY_ENV)
{
if (events.length () == 0)
@@ -167,27 +167,27 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events,
{
ACE_DEBUG ((LM_DEBUG, "Demo Consumer: received ACE_ES_EVENT_NOTIFICATION event.\n"));
- TAO_TRY
+ ACE_TRY
{
- cout << "ID: " << events[i].data.any_value.type()->id(TAO_TRY_ENV) << endl;
- TAO_CHECK_ENV;
- cout << "Name: " << events[i].data.any_value.type()->name(TAO_TRY_ENV) << endl;
- TAO_CHECK_ENV;
- cout << "member_count: " << events[i].data.any_value.type()->member_count(TAO_TRY_ENV) << endl;
- TAO_CHECK_ENV;
- cout << "TCKind: " << events[i].data.any_value.type()->kind(TAO_TRY_ENV) << endl;
- TAO_CHECK_ENV;
-
- if (_tc_Navigation->equal (events[i].data.any_value.type(), TAO_TRY_ENV))
+ cout << "ID: " << events[i].data.any_value.type()->id(ACE_TRY_ENV) << endl;
+ ACE_TRY_CHECK;
+ cout << "Name: " << events[i].data.any_value.type()->name(ACE_TRY_ENV) << endl;
+ ACE_TRY_CHECK;
+ cout << "member_count: " << events[i].data.any_value.type()->member_count(ACE_TRY_ENV) << endl;
+ ACE_TRY_CHECK;
+ cout << "TCKind: " << events[i].data.any_value.type()->kind(ACE_TRY_ENV) << endl;
+ ACE_TRY_CHECK;
+
+ if (_tc_Navigation->equal (events[i].data.any_value.type(), ACE_TRY_ENV))
{
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
Navigation *navigation_ = (Navigation*) events[i].data.any_value.value ();
cout << "Found a Navigation struct in the any: pos_lat = " << navigation_->position_latitude << endl;
}
- else if (_tc_Weapons->equal (events[i].data.any_value.type(), TAO_TRY_ENV))
+ else if (_tc_Weapons->equal (events[i].data.any_value.type(), ACE_TRY_ENV))
{
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
Weapons *weapons_ = (Weapons*) events[i].data.any_value.value ();
cout << "Found a Navigation struct in the any: pos_lat = " << weapons_->number_of_weapons << endl;
@@ -195,11 +195,11 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events,
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR, "(%t)Error in extracting the Navigation and Weapons data.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
}
}
@@ -207,25 +207,25 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events,
void
Demo_Consumer::shutdown (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Disconnect from the push supplier.
- this->suppliers_->disconnect_push_supplier (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->suppliers_->disconnect_push_supplier (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "@@ we should shutdown here!!!\n"));
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
TAO_ORB_Core_instance ()->orb ()->shutdown ();
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR,
"(%t) Demo_Consumer::shutdown: unexpected exception.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
// function get_options
@@ -271,13 +271,13 @@ get_options (int argc, char *argv [])
int
main (int argc, char *argv [])
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Initialize ORB.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CORBA::ORB_init (argc, argv, "internet", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::Object_var poa_object =
orb->resolve_initial_references("RootPOA");
@@ -288,12 +288,12 @@ main (int argc, char *argv [])
1);
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ root_poa->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::Object_var naming_obj =
orb->resolve_initial_references ("NameService");
@@ -305,8 +305,8 @@ main (int argc, char *argv [])
CosNaming::NamingContext_var naming_context =
CosNaming::NamingContext::_narrow (naming_obj.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_Scheduler_Factory::use_config (naming_context.in ());
@@ -321,12 +321,12 @@ main (int argc, char *argv [])
CORBA::Object_var ec_obj =
naming_context->resolve (channel_name,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
RtecEventChannelAdmin::EventChannel_var ec =
- RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in(), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in(), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (ec.ptr() == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -346,8 +346,8 @@ main (int argc, char *argv [])
"Someone was feeling introverted.\n"),
-1);
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ poa_manager->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Run the ORB
@@ -356,21 +356,21 @@ main (int argc, char *argv [])
"%p\n",
"CORBA::ORB::run"),
-1);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
delete demo_consumer;
root_poa->destroy (1,
1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp
index cc8def57a38..8d831bbb47d 100644
--- a/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp
@@ -241,7 +241,7 @@ Event_Supplier::insert_event_data (CORBA::Any &data,
{
static u_long last_completion = 0;
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
Schedule_Viewer_Data **sched_data;
@@ -282,7 +282,7 @@ Event_Supplier::insert_event_data (CORBA::Any &data,
navigation_.utilization = (double) (20.0 + ACE_OS::rand() % 10);
navigation_.overhead = (double) (ACE_OS::rand() % 10);
- data.replace (_tc_Navigation, &navigation_, 0, TAO_TRY_ENV);
+ data.replace (_tc_Navigation, &navigation_, 0, ACE_TRY_ENV);
}
else if ((strcmp((*sched_data)->operation_name, "high_10") == 0) ||
(strcmp((*sched_data)->operation_name, "low_10") == 0) ||
@@ -327,7 +327,7 @@ Event_Supplier::insert_event_data (CORBA::Any &data,
weapons_.utilization = (double) (20.0 + ACE_OS::rand() % 10);
weapons_.overhead = (double) (ACE_OS::rand() % 10);
- data.replace (_tc_Weapons, &weapons_, 0, TAO_TRY_ENV);
+ data.replace (_tc_Weapons, &weapons_, 0, ACE_TRY_ENV);
}
else {
ACE_ERROR ((LM_ERROR,
@@ -336,7 +336,7 @@ Event_Supplier::insert_event_data (CORBA::Any &data,
(*sched_data)->operation_name));
}
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
if (last_completion > (*sched_data)->completion_time)
@@ -361,12 +361,12 @@ Event_Supplier::insert_event_data (CORBA::Any &data,
if (schedule_iter.done ())
schedule_iter.first ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR,
"(%t)Error in Event_Supplier::insert_event_data.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
@@ -440,15 +440,15 @@ Event_Supplier::get_options (int argc, char *argv [])
int
main (int argc, char *argv [])
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Initialize ORB.
TAO_ORB_Manager orb_Manager;
orb_Manager.init (argc,
argv,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Create the demo supplier.
@@ -467,14 +467,14 @@ main (int argc, char *argv [])
// when done, we clean up
delete event_Supplier_ptr;
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp
index 2565d39232f..46dd0b4b0a7 100644
--- a/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp
@@ -254,7 +254,7 @@ Logging_Supplier::insert_event_data (CORBA::Any &data,
const TimeBase::TimeT TEN_HZ_PERIOD = ONE_HZ_PERIOD / 10;
const TimeBase::TimeT TWENTY_HZ_PERIOD = ONE_HZ_PERIOD / 20;
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
Schedule_Viewer_Data **sched_data;
@@ -304,7 +304,7 @@ Logging_Supplier::insert_event_data (CORBA::Any &data,
navigation_.utilization = (double) (20.0 + ACE_OS::rand() % 10);
navigation_.overhead = (double) (ACE_OS::rand() % 10);
- data.replace (_tc_Navigation, &navigation_, 0, TAO_TRY_ENV);
+ data.replace (_tc_Navigation, &navigation_, 0, ACE_TRY_ENV);
}
else if ((strcmp((*sched_data)->operation_name, "high_10") == 0) ||
(strcmp((*sched_data)->operation_name, "low_10") == 0) ||
@@ -356,7 +356,7 @@ Logging_Supplier::insert_event_data (CORBA::Any &data,
weapons_.update_data = update_data_;
- data.replace (_tc_Weapons, &weapons_, 0, TAO_TRY_ENV);
+ data.replace (_tc_Weapons, &weapons_, 0, ACE_TRY_ENV);
}
else {
ACE_ERROR ((LM_ERROR,
@@ -365,7 +365,7 @@ Logging_Supplier::insert_event_data (CORBA::Any &data,
(*sched_data)->operation_name));
}
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
if (last_completion > (*sched_data)->completion_time)
@@ -390,12 +390,12 @@ Logging_Supplier::insert_event_data (CORBA::Any &data,
if (schedule_iter.done ())
schedule_iter.first ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR ((LM_ERROR,
"(%t)Error in Logging_Supplier::insert_event_data.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
@@ -486,15 +486,15 @@ Logging_Supplier::get_options (int argc, char *argv [])
int
main (int argc, char *argv [])
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Initialize ORB.
TAO_ORB_Manager orb_Manager;
orb_Manager.init (argc,
argv,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Create the demo supplier.
@@ -513,14 +513,14 @@ main (int argc, char *argv [])
// when done, we clean up
delete event_Supplier_ptr;
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}