diff options
Diffstat (limited to 'TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp')
-rw-r--r-- | TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp b/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp index 9e7b2a0c4b1..311a4876080 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp +++ b/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp @@ -38,7 +38,7 @@ Factory_Trader::Factory_Trader (int debug_level) support_Attributes_ptr_(0), debug_level_ (debug_level) { - ACE_TRY_NEW_ENV + try { int argc = 0; // create the trader @@ -55,12 +55,11 @@ Factory_Trader::Factory_Trader (int debug_level) // Add the "Factory" type to the repository this->add_type (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "LifeCycle Server: (Factory_Trader::Factory_Trader) Failed adding a new type.\n"); + ex._tao_print_exception ( + "LifeCycle Server: (Factory_Trader::Factory_Trader) Failed adding a new type.\n"); } - ACE_ENDTRY; // @@ ACE_CHECK? No way to pass back any exceptions. } @@ -73,7 +72,7 @@ Factory_Trader::~Factory_Trader () void Factory_Trader::add_type () { - ACE_TRY_NEW_ENV + try { // define the new type CosTradingRepos::ServiceTypeRepository::PropStruct propStruct_name; @@ -103,15 +102,12 @@ Factory_Trader::add_type () this->repository_.add_type (CORBA::string_dup("GenericFactory"), GENERIC_FACTORY_INTERFACE_REPOSITORY_ID, propStructSeq, - superTypeSeq - ACE_ENV_ARG_PARAMETER); + superTypeSeq); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "LifeCycle Server: (Factory_Trader::init).\n"); + ex._tao_print_exception ("LifeCycle Server: (Factory_Trader::init).\n"); } - ACE_ENDTRY; // @@ ACE_CHECK } @@ -122,7 +118,7 @@ Factory_Trader::_cxx_export (const char * name, const char * description, const CORBA::Object_ptr object_ptr) { - ACE_TRY_NEW_ENV + try { if (CORBA::is_nil(object_ptr)) { @@ -147,17 +143,14 @@ Factory_Trader::_cxx_export (const char * name, // invoke the export method on the Register interface of the Trading Service register_ptr->_cxx_export (CORBA::Object::_duplicate (object_ptr), CORBA::string_dup("GenericFactory"), - propertySeq - ACE_ENV_ARG_PARAMETER); + propertySeq); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "LifeCycle Server (Factory_Trader::export): " - "Failed to export factory.\n"); + ex._tao_print_exception ( + "LifeCycle Server (Factory_Trader::export): ""Failed to export factory.\n"); } - ACE_ENDTRY; // @@ ACE_CHECK* } @@ -165,7 +158,7 @@ Factory_Trader::_cxx_export (const char * name, CORBA::Object_ptr Factory_Trader::query (const char* constraint) { - ACE_TRY_NEW_ENV + try { CosTrading::Lookup::SpecifiedProps specifiedProps; specifiedProps._d(CosTrading::Lookup::all); @@ -192,7 +185,7 @@ Factory_Trader::query (const char* constraint) CosTrading::OfferSeq_out(offerSeq_ptr), // results CosTrading::OfferIterator_out(offerIterator_ptr), // more results CosTrading::PolicyNameSeq_out(policyNameSeq_ptr) // Policies - ACE_ENV_ARG_PARAMETER); + ); // Initialize CORBA::Object_ptr object_ptr = 0; @@ -220,11 +213,11 @@ Factory_Trader::query (const char* constraint) } return object_ptr; } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Factory_Trader::query: Failed.\n"); + ex._tao_print_exception ( + "Factory_Trader::query: Failed.\n"); } - ACE_ENDTRY; // @@ ACE_CHECK_RETURN (?) return 0; } |