diff options
Diffstat (limited to 'TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp')
-rw-r--r-- | TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp index 0cd89b7d91e..9a6d581df91 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp +++ b/TAO/tests/NestedUpcall/MT_Client_Test/local_server.cpp @@ -145,15 +145,13 @@ MT_Server::init (int argc, "MT_Server::init: ORB_Manager is nil!\n"), -1); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Call the init of TAO_ORB_Manager to create a child POA // under the root POA. this->orb_manager_ptr_->init_child_poa (argc, argv, - "child_poa" - ACE_ENV_ARG_PARAMETER); + "child_poa"); this->parse_args (); @@ -161,8 +159,7 @@ MT_Server::init (int argc, this->str_ = this->orb_manager_ptr_->activate_under_child_poa ("MT", - &this->mT_Object_i_ - ACE_ENV_ARG_PARAMETER); + &this->mT_Object_i_); #if 0 ACE_DEBUG ((LM_DEBUG, @@ -187,16 +184,14 @@ MT_Server::init (int argc, CORBA::ORB_var orb_var = this->orb_manager_ptr_->orb (); CORBA::Object_var object_var = - orb_var->string_to_object (this->object_key_ - ACE_ENV_ARG_PARAMETER); + orb_var->string_to_object (this->object_key_); if (CORBA::is_nil (object_var.in())) ACE_ERROR_RETURN ((LM_ERROR, "No proper object has been returned.\n"), -1); - this->mT_Object_var_ = MT_Object::_narrow (object_var.in() - ACE_ENV_ARG_PARAMETER); + this->mT_Object_var_ = MT_Object::_narrow (object_var.in()); if (CORBA::is_nil (this->mT_Object_var_.in())) { @@ -208,12 +203,11 @@ MT_Server::init (int argc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "We have a proper reference to the Object.\n")); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "MT_Client::init"); + ex._tao_print_exception ("MT_Client::init"); return -1; } - ACE_ENDTRY; return 0; } @@ -221,8 +215,7 @@ MT_Server::init (int argc, int MT_Server::run () { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { int r = this->orb_manager_ptr_->run (); @@ -231,12 +224,11 @@ MT_Server::run () "MT_Server::run"), -1); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "MT_Server::run"); + ex._tao_print_exception ("MT_Server::run"); return -1; } - ACE_ENDTRY; return 0; } @@ -245,18 +237,15 @@ MT_Server::~MT_Server (void) if (this->object_key_ != 0) ACE_OS::free (this->object_key_); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { if (this->orb_manager_ptr_) - this->orb_manager_ptr_->deactivate_under_child_poa (this->str_.in () - ACE_ENV_ARG_PARAMETER); + this->orb_manager_ptr_->deactivate_under_child_poa (this->str_.in ()); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "MT_Client::~MT_Client"); + ex._tao_print_exception ("MT_Client::~MT_Client"); } - ACE_ENDTRY; } @@ -265,8 +254,7 @@ MT_Server::run_ORB_briefly (void) { if (this->iterations_ > 0) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { ACE_DEBUG ((LM_DEBUG, "(%P|%t) MT_Server::run: " @@ -278,17 +266,14 @@ MT_Server::run_ORB_briefly (void) this->mT_Object_i_._this (); this->mT_Object_var_->yadda (0, - tmp.in () - ACE_ENV_ARG_PARAMETER); + tmp.in ()); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "MT_Server::run_ORB_briefly"); + ex._tao_print_exception ("MT_Server::run_ORB_briefly"); return -1; } - ACE_ENDTRY; } return 0; } |