diff options
Diffstat (limited to 'TAO/orbsvcs/IFR_Service/ifr_adding_visitor_exception.cpp')
-rw-r--r-- | TAO/orbsvcs/IFR_Service/ifr_adding_visitor_exception.cpp | 140 |
1 files changed, 45 insertions, 95 deletions
diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_exception.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_exception.cpp index d22c22c825b..2e3ae1ea413 100644 --- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_exception.cpp +++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_exception.cpp @@ -48,8 +48,7 @@ ifr_adding_visitor_exception::visit_scope (UTL_Scope *node) AST_Field **f = 0; - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Visit each field. for (CORBA::ULong i = 0; i < nfields; ++i) @@ -89,8 +88,7 @@ ifr_adding_visitor_exception::visit_scope (UTL_Scope *node) else { // Updates ir_current_. - this->get_referenced_type (ft ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->get_referenced_type (ft); } this->members_[i].name = @@ -105,16 +103,14 @@ ifr_adding_visitor_exception::visit_scope (UTL_Scope *node) CORBA::IDLType::_duplicate (this->ir_current_.in ()); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION ( - ACE_ANY_EXCEPTION, - ACE_TEXT ("ifr_adding_visitor_structure::visit_scope") - ); + ex._tao_print_exception ( + ACE_TEXT ( + "ifr_adding_visitor_structure::visit_scope")); return -1; } - ACE_ENDTRY; return 0; } @@ -122,14 +118,11 @@ ifr_adding_visitor_exception::visit_scope (UTL_Scope *node) int ifr_adding_visitor_exception::visit_structure (AST_Structure *node) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Is this union already in the respository? CORBA::Contained_var prev_def = - be_global->repository ()->lookup_id (node->repoID () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + be_global->repository ()->lookup_id (node->repoID ()); // If not, create a new entry. if (CORBA::is_nil (prev_def.in ())) @@ -146,9 +139,7 @@ ifr_adding_visitor_exception::visit_structure (AST_Structure *node) CORBA::IDLType::_duplicate (visitor.ir_current ()); CORBA::Contained_ptr tmp = - CORBA::Contained::_narrow (visitor.ir_current () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::Contained::_narrow (visitor.ir_current ()); // Since the enclosing ExceptionDef hasn't been created // yet, we don't have a scope, so this nested StructDef @@ -167,29 +158,24 @@ ifr_adding_visitor_exception::visit_structure (AST_Structure *node) // original entry, create the new one, and let the user beware. if (node->ifr_added () == 0) { - prev_def->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + prev_def->destroy (); // This call will take the other branch. return this->visit_structure (node); } this->ir_current_ = - CORBA::IDLType::_narrow (prev_def.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::IDLType::_narrow (prev_def.in ()); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION ( - ACE_ANY_EXCEPTION, - ACE_TEXT ("ifr_adding_visitor_exception::visit_structure") - ); + ex._tao_print_exception ( + ACE_TEXT ( + "ifr_adding_visitor_exception::visit_structure")); return -1; } - ACE_ENDTRY; return 0; } @@ -197,13 +183,10 @@ ifr_adding_visitor_exception::visit_structure (AST_Structure *node) int ifr_adding_visitor_exception::visit_exception (AST_Exception *node) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { CORBA::Contained_var prev_def = - be_global->repository ()->lookup_id (node->repoID () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + be_global->repository ()->lookup_id (node->repoID ()); if (!CORBA::is_nil (prev_def.in ())) { @@ -222,8 +205,7 @@ ifr_adding_visitor_exception::visit_exception (AST_Exception *node) // original entry, create the new one, and let the user beware. if (node->ifr_added () == 0) { - prev_def->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + prev_def->destroy (); // This call will create a new ExceptionDef entry. return this->visit_exception (node); @@ -266,10 +248,8 @@ ifr_adding_visitor_exception::visit_exception (AST_Exception *node) current_scope->create_exception (node->repoID (), node->local_name ()->get_string (), node->version (), - this->members_ - ACE_ENV_ARG_PARAMETER); + this->members_); - ACE_TRY_CHECK; size_t size = this->move_queue_.size (); @@ -278,42 +258,34 @@ ifr_adding_visitor_exception::visit_exception (AST_Exception *node) CORBA::Contained_var traveller; CORBA::Container_var new_container = - CORBA::Container::_narrow (new_def.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::Container::_narrow (new_def.in ()); for (size_t i = 0; i < size; ++i) { this->move_queue_.dequeue_head (traveller); CORBA::String_var name = - traveller->name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + traveller->name (); CORBA::String_var version = - traveller->version (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + traveller->version (); traveller->move (new_container.in (), name.in (), - version.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + version.in ()); } } node->ifr_added (1); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION ( - ACE_ANY_EXCEPTION, - ACE_TEXT ("ifr_adding_visitor_exception::visit_exception") - ); + ex._tao_print_exception ( + ACE_TEXT ( + "ifr_adding_visitor_exception::visit_exception")); return -1; } - ACE_ENDTRY; return 0; } @@ -321,14 +293,11 @@ ifr_adding_visitor_exception::visit_exception (AST_Exception *node) int ifr_adding_visitor_exception::visit_enum (AST_Enum *node) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Is this enum already in the respository? CORBA::Contained_var prev_def = - be_global->repository ()->lookup_id (node->repoID () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + be_global->repository ()->lookup_id (node->repoID ()); // If not, create a new entry. if (CORBA::is_nil (prev_def.in ())) @@ -357,14 +326,10 @@ ifr_adding_visitor_exception::visit_enum (AST_Enum *node) node->local_name ()->get_string (), node->version (), members - ACE_ENV_ARG_PARAMETER ); - ACE_TRY_CHECK; CORBA::Contained_ptr tmp = - CORBA::Contained::_narrow (this->ir_current_.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::Contained::_narrow (this->ir_current_.in ()); this->move_queue_.enqueue_tail (tmp); @@ -378,29 +343,24 @@ ifr_adding_visitor_exception::visit_enum (AST_Enum *node) // original entry, create the new one, and let the user beware. if (node->ifr_added () == 0) { - prev_def->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + prev_def->destroy (); // This call will take the other branch. return this->visit_enum (node); } this->ir_current_ = - CORBA::IDLType::_narrow (prev_def.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::IDLType::_narrow (prev_def.in ()); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION ( - ACE_ANY_EXCEPTION, - ACE_TEXT ("ifr_adding_visitor_exception::visit_enum") - ); + ex._tao_print_exception ( + ACE_TEXT ( + "ifr_adding_visitor_exception::visit_enum")); return -1; } - ACE_ENDTRY; return 0; } @@ -408,14 +368,11 @@ ifr_adding_visitor_exception::visit_enum (AST_Enum *node) int ifr_adding_visitor_exception::visit_union (AST_Union *node) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Is this union already in the respository? CORBA::Contained_var prev_def = - be_global->repository ()->lookup_id (node->repoID () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + be_global->repository ()->lookup_id (node->repoID ()); // If not, create a new entry. if (CORBA::is_nil (prev_def.in ())) @@ -432,9 +389,7 @@ ifr_adding_visitor_exception::visit_union (AST_Union *node) CORBA::IDLType::_duplicate (visitor.ir_current ()); CORBA::Contained_ptr tmp = - CORBA::Contained::_narrow (visitor.ir_current () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::Contained::_narrow (visitor.ir_current ()); // Since the enclosing ExceptionDef hasn't been created // yet, we don't have a scope, so this nested UnionDef @@ -453,29 +408,24 @@ ifr_adding_visitor_exception::visit_union (AST_Union *node) // original entry, create the new one, and let the user beware. if (node->ifr_added () == 0) { - prev_def->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + prev_def->destroy (); // This call will take the other branch. return this->visit_union (node); } this->ir_current_ = - CORBA::IDLType::_narrow (prev_def.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + CORBA::IDLType::_narrow (prev_def.in ()); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION ( - ACE_ANY_EXCEPTION, - ACE_TEXT ("ifr_adding_visitor_exception::visit_union") - ); + ex._tao_print_exception ( + ACE_TEXT ( + "ifr_adding_visitor_exception::visit_union")); return -1; } - ACE_ENDTRY; return 0; } |