diff options
Diffstat (limited to 'TAO/orbsvcs/tests')
-rw-r--r-- | TAO/orbsvcs/tests/Property/README | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Property/client.cpp | 282 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Property/client.h | 28 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Property/main.cpp | 208 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Property/server.cpp | 60 |
5 files changed, 294 insertions, 286 deletions
diff --git a/TAO/orbsvcs/tests/Property/README b/TAO/orbsvcs/tests/Property/README index d4ef6651baa..6ff16d26744 100644 --- a/TAO/orbsvcs/tests/Property/README +++ b/TAO/orbsvcs/tests/Property/README @@ -23,7 +23,7 @@ same host. Naming Service: -------------- -% $TAO_ROOT/orbsvcs/NamingService/NamingService [-ORBnameserviceport <portnum>] +% $TAO_ROOT/orbsvcs/Naming_Service/Naming_Service [-ORBnameserviceport <portnum>] Server: ----- diff --git a/TAO/orbsvcs/tests/Property/client.cpp b/TAO/orbsvcs/tests/Property/client.cpp index 138f21d5643..29318359098 100644 --- a/TAO/orbsvcs/tests/Property/client.cpp +++ b/TAO/orbsvcs/tests/Property/client.cpp @@ -1,4 +1,4 @@ -// $Id$ + // $Id$ // ============================================================================ // @@ -27,13 +27,13 @@ ACE_RCSID(CosPropertyService, client, "$Id$") int Client::init (int argc, char *argv[], - CORBA::Environment &env) + CORBA::Environment &ACE_TRY_ENV) { // Init the ORB. manager_.init (argc, argv, - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Open the ORB. manager_.orb ()->open (); @@ -51,14 +51,14 @@ Client::init (int argc, propsetdef_name.length (1); propsetdef_name [0].id = CORBA::string_dup ("PropertySetDef"); CORBA::Object_var propsetdef_obj = my_name_client_->resolve (propsetdef_name, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN (1); ACE_DEBUG ((LM_DEBUG, "Naming resolve done\n")); this->propsetdef_ = CosPropertyService::PropertySetDef::_narrow (propsetdef_obj.in (), - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->propsetdef_.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -71,63 +71,63 @@ Client::init (int argc, // Testing the methods of the property service. int -Client::property_tester (CORBA::Environment &env) +Client::property_tester (CORBA::Environment &ACE_TRY_ENV) { // = Testing PropertySet & Iterators. // Testing define_property () of PropertySet interface. - this->test_define_property (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_define_property (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Test the number of properties. - this->test_get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_number_of_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing get_all_property_names. - this->test_get_all_property_names (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_all_property_names (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Test get_property_value. - this->test_get_property_value (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_property_value (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing delete property. - this->test_delete_property ("no_property",env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_delete_property ("no_property",ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing get_properties. - this->test_get_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing delete_properties. - this->test_delete_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_delete_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Test the number of properties. - this->test_get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_number_of_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing define_properties. - this->test_define_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_define_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Test the number of properties. - this->test_get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_number_of_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing get_all_property_names. - this->test_get_all_property_names (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_all_property_names (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Testing get_all_properties. - this->test_get_all_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_get_all_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // = Testing PropertySetDef & Iterators. // Testing define_property_with_mode. - this->test_define_property_with_mode (env); - TAO_CHECK_ENV_RETURN (env, -1); + this->test_define_property_with_mode (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); return 0; } @@ -135,7 +135,7 @@ Client::property_tester (CORBA::Environment &env) // Testing define_property. int -Client::test_define_property (CORBA::Environment &env) +Client::test_define_property (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking define_property\n")); @@ -153,14 +153,14 @@ Client::test_define_property (CORBA::Environment &env) ch)); this->propsetdef_->define_property ("char_property", anyval, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) + if ((ACE_TRY_ENV.exception () != 0) && + (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0)) { - env.print_exception ("char_property"); - env.clear (); + ACE_TRY_ENV.print_exception ("char_property"); + ACE_TRY_ENV.clear (); } // Prepare a Short and "define" that in the PropertySet. @@ -174,14 +174,14 @@ Client::test_define_property (CORBA::Environment &env) s)); propsetdef_->define_property ("short_property", anyval, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) + if ((ACE_TRY_ENV.exception () != 0) && + (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0)) { - env.print_exception ("char_property"); - env.clear (); + ACE_TRY_ENV.print_exception ("char_property"); + ACE_TRY_ENV.clear (); } // Prepare a Long and "define" that in the PropertySet. @@ -195,14 +195,14 @@ Client::test_define_property (CORBA::Environment &env) CORBA::Any newany(anyval); propsetdef_->define_property ("long_property", anyval, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) + if ((ACE_TRY_ENV.exception () != 0) && + (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0)) { - env.print_exception ("char_property"); - env.clear (); + ACE_TRY_ENV.print_exception ("char_property"); + ACE_TRY_ENV.clear (); } // Prepare a Float and "define" that in the PropertySet. @@ -215,14 +215,14 @@ Client::test_define_property (CORBA::Environment &env) f)); propsetdef_->define_property ("float_property", anyval, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) + if ((ACE_TRY_ENV.exception () != 0) && + (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0)) { - env.print_exception ("char_property"); - env.clear (); + ACE_TRY_ENV.print_exception ("char_property"); + ACE_TRY_ENV.clear (); } // Prepare a String and "define" that in the PropertySet. @@ -238,14 +238,14 @@ Client::test_define_property (CORBA::Environment &env) newstr)); propsetdef_->define_property ("string_property", anyval, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) + if ((ACE_TRY_ENV.exception () != 0) && + (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0)) { - env.print_exception ("string_property"); - env.clear (); + ACE_TRY_ENV.print_exception ("string_property"); + ACE_TRY_ENV.clear (); } return 0; @@ -254,15 +254,15 @@ Client::test_define_property (CORBA::Environment &env) // Testing get_all_property_names of the PropertySet. int -Client::test_get_all_property_names (CORBA::Environment &env) +Client::test_get_all_property_names (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nTesting get_all_property_names ()\n")); // Get the size. CORBA::ULong num_of_properties = - propsetdef_->get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); + propsetdef_->get_number_of_properties (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Get half on the names and half of on the iterator. CORBA::ULong how_many = num_of_properties / 2; @@ -280,8 +280,8 @@ Client::test_get_all_property_names (CORBA::Environment &env) propsetdef_->get_all_property_names (how_many, names_out, iterator_out, - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); // Get the values back to var. names_var = names_out.ptr (); @@ -307,24 +307,24 @@ Client::test_get_all_property_names (CORBA::Environment &env) CosPropertyService::PropertyName_out name_out (name_ptr); // Call the function. - CORBA::Boolean next_one_result = iterator_var->next_one (name_out, env); + CORBA::Boolean next_one_result = iterator_var->next_one (name_out, ACE_TRY_ENV); // Get the values back on a _var variable. CosPropertyService::PropertyName_var name_var = name_out.ptr (); while (next_one_result == 1) { - TAO_CHECK_ENV_RETURN (env, -1); + ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, "%s\n", name_var.in ())); // Call the function to iterate again. - next_one_result = iterator_var->next_one (name_out, env); + next_one_result = iterator_var->next_one (name_out, ACE_TRY_ENV); // Get the values back on a _var variable. name_var = name_out.ptr (); } - TAO_CHECK_ENV_RETURN (env, -1); + ACE_CHECK_RETURN (-1); } return 0; @@ -334,7 +334,7 @@ Client::test_get_all_property_names (CORBA::Environment &env) // properties. int -Client::test_get_properties (CORBA::Environment &env) +Client::test_get_properties (CORBA::Environment &ACE_TRY_ENV) { // Get float_property, string_property and no_property. If return // value is false and type is tc_void then that name is not there in @@ -362,9 +362,9 @@ Client::test_get_properties (CORBA::Environment &env) // Get the properties. CORBA::Boolean return_val = propsetdef_->get_properties (names.in (), properties_out, - env); + ACE_TRY_ENV); ACE_UNUSED_ARG (return_val); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_CHECK_RETURN (-1); // Get the value to the _var. CosPropertyService::Properties_var properties = properties_out.ptr (); @@ -392,12 +392,12 @@ Client::test_get_properties (CORBA::Environment &env) // Testing, get_number_of_properties. int -Client::test_get_number_of_properties (CORBA::Environment &env) +Client::test_get_number_of_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nNumber of props : %d\n", - this->propsetdef_->get_number_of_properties (env))); - TAO_CHECK_ENV_RETURN (env, -1); + this->propsetdef_->get_number_of_properties (ACE_TRY_ENV))); + ACE_CHECK_RETURN (-1); return 0; } @@ -406,28 +406,29 @@ Client::test_get_number_of_properties (CORBA::Environment &env) int Client::test_delete_property (CORBA::String property_name, - CORBA::Environment &env) + CORBA::Environment &ACE_TRY_ENV) { - ACE_UNUSED_ARG (env); + ACE_UNUSED_ARG (ACE_TRY_ENV); ACE_DEBUG ((LM_DEBUG, "\nDeleting %s\n",property_name)); - TAO_TRY + ACE_TRY { - this->propsetdef_->delete_property (property_name, TAO_TRY_ENV); - TAO_CHECK_ENV; + this->propsetdef_->delete_property (property_name, + ACE_TRY_ENV); + ACE_TRY_CHECK; } - TAO_CATCH (CORBA::UserException, ex) + ACE_CATCH (CORBA::UserException, ex) { - TAO_TRY_ENV.print_exception ("User exception"); + ACE_PRINT_EXCEPTION (ex, "User exception"); return -1; } - TAO_CATCHANY + ACE_CATCHANY { - TAO_TRY_ENV.print_exception ("Not an user exception"); + ACE_PRINT_EXCEPTION (ex, "Not an user exception"); return -1; } - TAO_ENDTRY; + ACE_ENDTRY; return 0; } @@ -438,7 +439,7 @@ Client::test_delete_property (CORBA::String property_name, // properties. int -Client::test_delete_properties (CORBA::Environment &env) +Client::test_delete_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking delete_properties\n")); @@ -453,8 +454,8 @@ Client::test_delete_properties (CORBA::Environment &env) prop_names.length (), prop_names.maximum ())); this->propsetdef_->delete_properties (prop_names, - env); - TAO_CHECK_ENV_RETURN (env, 0); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 0); return 0; } @@ -463,7 +464,7 @@ Client::test_delete_properties (CORBA::Environment &env) // float in the property set. int -Client::test_define_properties (CORBA::Environment &env) +Client::test_define_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking define_properties\n")); @@ -503,8 +504,8 @@ Client::test_define_properties (CORBA::Environment &env) nproperties[3].property_value <<= f; // Define this sequence of properties now. - this->propsetdef_->define_properties (nproperties, env); - TAO_CHECK_ENV_RETURN (env, -1); + this->propsetdef_->define_properties (nproperties, ACE_TRY_ENV); + ACE_CHECK_RETURN ( -1); return 0; } @@ -512,15 +513,15 @@ Client::test_define_properties (CORBA::Environment &env) // Test get_all_properties. int -Client::test_get_all_properties (CORBA::Environment &env) +Client::test_get_all_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nTesting get_all_properties\n")); // Get the number of current properties. CORBA::ULong num_of_properties = - this->propsetdef_->get_number_of_properties (env); + this->propsetdef_->get_number_of_properties (ACE_TRY_ENV); ACE_UNUSED_ARG (num_of_properties); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_CHECK_RETURN ( -1); // Get half on the properties and half of on the iterator. CORBA::ULong how_many = 1; @@ -534,8 +535,8 @@ Client::test_get_all_properties (CORBA::Environment &env) propsetdef_->get_all_properties (how_many, properties_out, iterator_out, - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( -1); // Get these values to the _var's. CosPropertyService::Properties_var properties = properties_out.ptr (); @@ -589,7 +590,7 @@ Client::test_get_all_properties (CORBA::Environment &env) // Call the funtion. CORBA::Boolean next_one_result = iterator->next_one (property_out, - env); + ACE_TRY_ENV); // Get the value to the _var variable. CosPropertyService::Property_var property = property_out.ptr (); @@ -597,7 +598,7 @@ Client::test_get_all_properties (CORBA::Environment &env) while (next_one_result != 0) { ACE_DEBUG ((LM_DEBUG, "Iteration over PropertyIterartor")); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_CHECK_RETURN ( -1); ACE_DEBUG ((LM_DEBUG, "%s : ", property->property_name.in ())); @@ -640,12 +641,12 @@ Client::test_get_all_properties (CORBA::Environment &env) // Call the function for the next iteraton. next_one_result = iterator->next_one (property_out, - env); + ACE_TRY_ENV); // Get the value to the _var variable. property = property_out.ptr (); } - TAO_CHECK_ENV_RETURN (env, -1); + ACE_CHECK_RETURN ( -1); } return 0; } @@ -653,7 +654,7 @@ Client::test_get_all_properties (CORBA::Environment &env) // Testing define property with mode. // Defines char, short, long and float properties with different modes. int -Client::test_define_property_with_mode (CORBA::Environment &env) +Client::test_define_property_with_mode (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking define_property_with_mode\n")); @@ -672,13 +673,13 @@ Client::test_define_property_with_mode (CORBA::Environment &env) this->propsetdef_->define_property_with_mode ("char_property", anyval, CosPropertyService::normal, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) + if ((ACE_TRY_ENV.exception () != 0) && + (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0)) { - env.print_exception ("char_property"); - env.clear (); + ACE_TRY_ENV.print_exception ("char_property"); + ACE_TRY_ENV.clear (); } // Prepare a Short and "define" that in the PropertySet. @@ -693,13 +694,13 @@ Client::test_define_property_with_mode (CORBA::Environment &env) propsetdef_->define_property_with_mode ("short_property", anyval, CosPropertyService::read_only, - env); + ACE_TRY_ENV); // Check if that is an user exception, if so, print it out. - if (env.exception () != 0) + if (ACE_TRY_ENV.exception () != 0) { - env.print_exception ("char_property"); - if (CORBA::UserException::_narrow (env.exception ()) != 0) - env.clear (); + ACE_TRY_ENV.print_exception ("char_property"); + if (CORBA::UserException::_narrow (ACE_TRY_ENV.exception ()) != 0) + ACE_TRY_ENV.clear (); else return -1; } @@ -717,8 +718,8 @@ Client::test_define_property_with_mode (CORBA::Environment &env) propsetdef_->define_property_with_mode ("long_property", anyval, CosPropertyService::fixed_normal, - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( -1); // Prepare a Float and "define" that in the PropertySet. @@ -732,8 +733,8 @@ Client::test_define_property_with_mode (CORBA::Environment &env) propsetdef_->define_property_with_mode ("float_property", anyval, CosPropertyService::fixed_readonly, - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( -1); // Prepare a String and "define" that in the PropertySet. ACE_DEBUG ((LM_DEBUG, @@ -749,25 +750,25 @@ Client::test_define_property_with_mode (CORBA::Environment &env) newstr)); propsetdef_->define_property ("string_property", anyval, - env); - TAO_CHECK_ENV_RETURN (env, -1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( -1); return 0; } int -Client::test_get_property_value (CORBA::Environment &env) +Client::test_get_property_value (CORBA::Environment &ACE_TRY_ENV) { - ACE_UNUSED_ARG (env); + ACE_UNUSED_ARG (ACE_TRY_ENV); ACE_DEBUG ((LM_DEBUG, "Testing get_property_value\n")); - TAO_TRY + ACE_TRY { // Get the ior property. CORBA::Any_ptr any_ptr = this->propsetdef_->get_property_value ("PropertySetDef_IOR", - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Property value received successfully\n")); @@ -777,8 +778,8 @@ Client::test_get_property_value (CORBA::Environment &env) CosPropertyService::PropertySetDef_var propsetdef = CosPropertyService::PropertySetDef::_narrow (propsetdef_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; if (CORBA::is_nil (propsetdef.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -787,41 +788,46 @@ Client::test_get_property_value (CORBA::Environment &env) ACE_DEBUG ((LM_DEBUG, "IOR retrieved\n")); } - TAO_CATCHANY + ACE_CATCHANY { - TAO_TRY_ENV.print_exception ("get_property_value"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "get_property_value"); return -1; } - TAO_ENDTRY; + ACE_ENDTRY; + ACE_CHECK_RETURN (1); return 0; } int main (int argc, char **argv) { - TAO_TRY + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY { Client client; if (client.init (argc, argv, - TAO_TRY_ENV) == -1) + ACE_TRY_ENV) == -1) return 1; - TAO_CHECK_ENV; + ACE_TRY_CHECK; - // client.run (TAO_TRY_ENV); - if (client.property_tester (TAO_TRY_ENV) != 0) + // client.run (ACE_TRY_ENV); + if (client.property_tester (ACE_TRY_ENV) != 0) ACE_DEBUG ((LM_DEBUG, "Test failed\n")); else ACE_DEBUG ((LM_DEBUG, "Test succeeded\n")); - TAO_CHECK_ENV; + ACE_TRY_CHECK; } - TAO_CATCHANY + ACE_CATCHANY { - TAO_TRY_ENV.print_exception ("PropertyService Test : client"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "PropertyService Test : client"); return -1; } - TAO_ENDTRY; - + ACE_ENDTRY; + return 0; } diff --git a/TAO/orbsvcs/tests/Property/client.h b/TAO/orbsvcs/tests/Property/client.h index dab07813f50..9abb9bd0ca5 100644 --- a/TAO/orbsvcs/tests/Property/client.h +++ b/TAO/orbsvcs/tests/Property/client.h @@ -46,52 +46,52 @@ public: int init (int argc, char **argv, - CORBA::Environment &env); + CORBA::Environment &ACE_TRY_ENV); // Initialize the ORB etc, and bind the MMDevices. - int run (CORBA::Environment &env); + int run (CORBA::Environment &ACE_TRY_ENV); // Run the client. This will call StreamCtrl::bind_devs. - int property_tester (CORBA::Environment &env); + int property_tester (CORBA::Environment &ACE_TRY_ENV); // Testing the property service methods. protected: int bind_to_remote_mmdevice (int argc, char *argv[], - CORBA::Environment &env); + CORBA::Environment &ACE_TRY_ENV); // Bind to the remote MMDevice. // = Property Testing. - int test_define_property (CORBA::Environment &env); + int test_define_property (CORBA::Environment &ACE_TRY_ENV); // Testing the define property method. - int test_get_number_of_properties (CORBA::Environment &env); + int test_get_number_of_properties (CORBA::Environment &ACE_TRY_ENV); // Testing the number of properties, currently in the Property Set. - int test_get_all_property_names (CORBA::Environment &env); + int test_get_all_property_names (CORBA::Environment &ACE_TRY_ENV); //Testing get_all_property_names. - int test_get_property_value (CORBA::Environment &env); + int test_get_property_value (CORBA::Environment &ACE_TRY_ENV); // Testing get_property_value. - int test_get_properties (CORBA::Environment &env); + int test_get_properties (CORBA::Environment &ACE_TRY_ENV); //Testing get_properties. Give the names and get their properties. - int test_get_all_properties (CORBA::Environment &env); + int test_get_all_properties (CORBA::Environment &ACE_TRY_ENV); // Testing get_all_properties. int test_delete_property (CORBA::String property_name, - CORBA::Environment &env); + CORBA::Environment &ACE_TRY_ENV); // Testing delete_property. - int test_delete_properties (CORBA::Environment &env); + int test_delete_properties (CORBA::Environment &ACE_TRY_ENV); // Testing delete_properties. - int test_define_properties (CORBA::Environment &env); + int test_define_properties (CORBA::Environment &ACE_TRY_ENV); // Defining a sequence of properties. - int test_define_property_with_mode (CORBA::Environment &env); + int test_define_property_with_mode (CORBA::Environment &ACE_TRY_ENV); // Defines properties with various modes. TAO_ORB_Manager manager_; diff --git a/TAO/orbsvcs/tests/Property/main.cpp b/TAO/orbsvcs/tests/Property/main.cpp index eb739fae1d6..9c8f3b1736a 100644 --- a/TAO/orbsvcs/tests/Property/main.cpp +++ b/TAO/orbsvcs/tests/Property/main.cpp @@ -40,31 +40,31 @@ public: ~TAO_PropertySet_Tester (void); // Destructor. - int test_define_property (CORBA::Environment &env); + int test_define_property (CORBA::Environment &ACE_TRY_ENV); // Defines a char,a short, a long, a float and a string property. - int test_get_number_of_properties (CORBA::Environment &env); + int test_get_number_of_properties (CORBA::Environment &ACE_TRY_ENV); // Gets the number of properties currently defined in the PropertySet. int test_delete_property (const char *property_name, - CORBA::Environment &env); + CORBA::Environment &ACE_TRY_ENV); // Delete a given property. - int test_is_property_defined (CORBA::Environment &env); + int test_is_property_defined (CORBA::Environment &ACE_TRY_ENV); // Check the following properties are defined or // no. "char_property", "short_property" and a "string_property". - int test_get_property_value (CORBA::Environment &env); + int test_get_property_value (CORBA::Environment &ACE_TRY_ENV); // Get the "float_property" and "string_property" and print them // out. - int test_delete_properties (CORBA::Environment &env); + int test_delete_properties (CORBA::Environment &ACE_TRY_ENV); // Delete char, short,long, and string properties. - int test_delete_all_properties (CORBA::Environment &env); + int test_delete_all_properties (CORBA::Environment &ACE_TRY_ENV); // Delete all the properties. - int test_define_properties (CORBA::Environment &env); + int test_define_properties (CORBA::Environment &ACE_TRY_ENV); // Define a sequence of properties. a char, a short, a long, a float // and a string. @@ -89,14 +89,14 @@ public: ~TAO_PropertyNamesIterator_Tester (void); // Destructor. - int test_next_one (CORBA::Environment &env); + int test_next_one (CORBA::Environment &ACE_TRY_ENV); // Test next one method. Iterate thru all the names in the // PropertySet and print them out. - int test_reset (CORBA::Environment &env); + int test_reset (CORBA::Environment &ACE_TRY_ENV); // Test the reset method. - int test_next_n (size_t n, CORBA::Environment &env); + int test_next_n (size_t n, CORBA::Environment &ACE_TRY_ENV); // Test the next_n method. private: TAO_PropertyNamesIterator iterator_; @@ -116,7 +116,7 @@ TAO_PropertySet_Tester::~TAO_PropertySet_Tester (void) // Defines a char, a short, a long, a float and a string. int -TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) +TAO_PropertySet_Tester::test_define_property (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking define_property\n")); @@ -133,8 +133,8 @@ TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) ch)); property_set_.define_property ("char_property", anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); // Prepare a Short and "define" that in the PropertySet. CORBA::Short s = 3; @@ -146,8 +146,8 @@ TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) s)); property_set_.define_property ("short_property", anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); // Prepare a Long and "define" that in the PropertySet. @@ -162,8 +162,8 @@ TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) property_set_.define_property ("long_property", anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); // Prepare a Float and "define" that in the PropertySet. CORBA::Float f = 3.14; @@ -175,8 +175,8 @@ TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) f)); property_set_.define_property ("float_property", anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); // Prepare a String and "define" that in the PropertySet. ACE_DEBUG ((LM_DEBUG, @@ -191,20 +191,20 @@ TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) newstr)); property_set_.define_property ("string_property", anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); return 0; } // Testing, get_number_of_properties. int -TAO_PropertySet_Tester::test_get_number_of_properties (CORBA::Environment &env) +TAO_PropertySet_Tester::test_get_number_of_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "Main : Number of props : %d\n", - property_set_.get_number_of_properties (env))); - TAO_CHECK_ENV_RETURN (env, 1); + property_set_.get_number_of_properties (ACE_TRY_ENV))); + ACE_CHECK_RETURN ( 1); return 0; } @@ -213,12 +213,12 @@ TAO_PropertySet_Tester::test_get_number_of_properties (CORBA::Environment &env) // if that exsists. int TAO_PropertySet_Tester::test_delete_property (const char *property_name, - CORBA::Environment &env) + CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking delete_property\n")); property_set_.delete_property (property_name, - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); return 0; } @@ -226,14 +226,14 @@ TAO_PropertySet_Tester::test_delete_property (const char *property_name, // Gets the value of "short_property" and "string_property". int -TAO_PropertySet_Tester::test_get_property_value (CORBA::Environment &env) +TAO_PropertySet_Tester::test_get_property_value (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking get_property_value\n")); CORBA::Any_ptr anyptr = property_set_.get_property_value ("short_property", - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); // Get the short value. if (anyptr != 0) @@ -249,8 +249,8 @@ TAO_PropertySet_Tester::test_get_property_value (CORBA::Environment &env) "Short property not found\n")); // Get the string. anyptr = property_set_.get_property_value ("string_property", - env); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); if (anyptr != 0) { CORBA::String str; @@ -268,34 +268,34 @@ TAO_PropertySet_Tester::test_get_property_value (CORBA::Environment &env) // "string_property" and "char_property". int -TAO_PropertySet_Tester::test_is_property_defined (CORBA::Environment &env) +TAO_PropertySet_Tester::test_is_property_defined (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking is_property_defined ()\n")); if (property_set_.is_property_defined ("short_property", - env) == 0) + ACE_TRY_ENV) == 0) ACE_DEBUG ((LM_DEBUG, "short_property not defined\n")); else ACE_DEBUG ((LM_DEBUG, "short_property defined\n")); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_CHECK_RETURN ( 1); if (property_set_.is_property_defined ("string_property", - env) == 0) + ACE_TRY_ENV) == 0) ACE_DEBUG ((LM_DEBUG, "string_property not defined\n")); else ACE_DEBUG ((LM_DEBUG, "string_property defined\n")); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_CHECK_RETURN ( 1); if (property_set_.is_property_defined ("char_property", - env) == 0) + ACE_TRY_ENV) == 0) ACE_DEBUG ((LM_DEBUG, "char_property not defined\n")); else ACE_DEBUG ((LM_DEBUG, "char_property defined\n")); - TAO_CHECK_ENV_RETURN (env, 1); + ACE_CHECK_RETURN ( 1); return 0; } @@ -304,7 +304,7 @@ TAO_PropertySet_Tester::test_is_property_defined (CORBA::Environment &env) // PropertySet. Deleting char, short, long, float and string // properties. int -TAO_PropertySet_Tester::test_delete_properties (CORBA::Environment &env) +TAO_PropertySet_Tester::test_delete_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking delete_properties == Deleting a sequence of Properties\n")); @@ -319,8 +319,8 @@ TAO_PropertySet_Tester::test_delete_properties (CORBA::Environment &env) prop_names.length (), prop_names.maximum ())); property_set_.delete_properties (prop_names, - env); - TAO_CHECK_ENV_RETURN (env, 0); + ACE_TRY_ENV); + ACE_CHECK_RETURN ( 0); return 0; } @@ -328,7 +328,7 @@ TAO_PropertySet_Tester::test_delete_properties (CORBA::Environment &env) // Defines a sequnce of properties containing, char, short, long, // float and string property in the property set. int -TAO_PropertySet_Tester::test_define_properties (CORBA::Environment &env) +TAO_PropertySet_Tester::test_define_properties (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "\nChecking define_properties == Defining sequence of properties\n")); @@ -376,20 +376,20 @@ TAO_PropertySet_Tester::test_define_properties (CORBA::Environment &env) nproperties[4].property_value <<= strvar.in (); // Define this sequence of properties now. - property_set_.define_properties (nproperties, env); - TAO_CHECK_ENV_RETURN (env, 1); + property_set_.define_properties (nproperties, ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); return 0; } // Delete all the properties. int -TAO_PropertySet_Tester::test_delete_all_properties (CORBA::Environment &env) +TAO_PropertySet_Tester::test_delete_all_properties (CORBA::Environment &ACE_TRY_ENV) { // Deleting all the properties ACE_DEBUG ((LM_DEBUG, "\nChecking delete_all_properties\n")); - if (property_set_.delete_all_properties (env) == 1) + if (property_set_.delete_all_properties (ACE_TRY_ENV) == 1) ACE_DEBUG ((LM_DEBUG, "All properties deleted, I guess\n")); else @@ -412,15 +412,15 @@ TAO_PropertyNamesIterator_Tester::~TAO_PropertyNamesIterator_Tester (void) // Test next one method. Iterate thru all the names in the // PropertySet and print them out. int -TAO_PropertyNamesIterator_Tester::test_next_one (CORBA::Environment &env) +TAO_PropertyNamesIterator_Tester::test_next_one (CORBA::Environment &ACE_TRY_ENV) { CORBA::String_var strvar; ACE_DEBUG ((LM_DEBUG, "\nTesting next_one of NamesIterator, Iterating thru names.\n")); // Let us iterate, now. - while (iterator_.next_one (strvar.out (), env) != 0) + while (iterator_.next_one (strvar.out (), ACE_TRY_ENV) != 0) { - TAO_CHECK_ENV_RETURN (env, 1); + ACE_CHECK_RETURN ( 1); ACE_DEBUG ((LM_DEBUG, "Str : %s\n", strvar.in ())); } return 0; @@ -428,33 +428,33 @@ TAO_PropertyNamesIterator_Tester::test_next_one (CORBA::Environment &env) // Reset the names iterator. int -TAO_PropertyNamesIterator_Tester::test_reset (CORBA::Environment &env) +TAO_PropertyNamesIterator_Tester::test_reset (CORBA::Environment &ACE_TRY_ENV) { ACE_DEBUG ((LM_DEBUG, "Resetting (reset ()) the NamesIterator.")); - iterator_.reset (env); - TAO_CHECK_ENV_RETURN (env, 1); + iterator_.reset (ACE_TRY_ENV); + ACE_CHECK_RETURN ( 1); return 0; } // Test the next_n method. Get the next n names and print them all. int TAO_PropertyNamesIterator_Tester::test_next_n (size_t n, - CORBA::Environment &env) + CORBA::Environment &ACE_TRY_ENV) { CosPropertyService::PropertyNames_var pnames_var; ACE_DEBUG ((LM_DEBUG, "Checking next_n (), next %d\n", n)); - if (iterator_.next_n (n, pnames_var.out (), env) == 0) + if (iterator_.next_n (n, pnames_var.out (), ACE_TRY_ENV) == 0) { // Return if no more items in the iterator. - TAO_CHECK_ENV_RETURN (env, 1); + ACE_CHECK_RETURN ( 1); ACE_DEBUG ((LM_DEBUG, "Iterator has no more items\n")); return 0; } - TAO_CHECK_ENV_RETURN (env, 1); + ACE_CHECK_RETURN ( 1); for (size_t i = 0; i < pnames_var.in ().length (); i++) ACE_DEBUG ((LM_DEBUG, "str %s \n", @@ -465,13 +465,13 @@ TAO_PropertyNamesIterator_Tester::test_next_n (size_t n, int main (int argc, char *argv []) { - TAO_TRY + ACE_TRY { CORBA::ORB_var orb_var = CORBA::ORB_init (argc, argv, "internet", - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; // = Checking PropertySet interface. @@ -481,58 +481,58 @@ main (int argc, char *argv []) // Checking define_property. define a char, a short,a long, a float // and a string. - propertyset_tester.test_define_property (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_define_property (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_number_of_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test delete property. Delete "string_property" - propertyset_tester.test_delete_property ("string_property", TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_delete_property ("string_property", ACE_TRY_ENV); + ACE_TRY_CHECK; // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_number_of_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test delete_properties. Delete char, short, long and float. - propertyset_tester.test_delete_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_delete_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_number_of_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Define a sequence of properties. char, short, long, float and // string. - propertyset_tester.test_define_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_define_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_number_of_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Checking get_property_value. get the value of short and string. - propertyset_tester.test_get_property_value (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_property_value (ACE_TRY_ENV); + ACE_TRY_CHECK; // Checking delete_all_properties. - propertyset_tester.test_delete_all_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_delete_all_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_number_of_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Define a sequence of properties. char, short, long, float and // string. - propertyset_tester.test_define_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_define_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; + propertyset_tester.test_get_number_of_properties (ACE_TRY_ENV); + ACE_TRY_CHECK; // = Checking the PropertyNamesIterator interface. @@ -543,40 +543,40 @@ main (int argc, char *argv []) TAO_PropertyNamesIterator_Tester names_iterator_tester (propertyset_tester); // Checking next_one. Iterate thru the property names. - names_iterator_tester.test_next_one (TAO_TRY_ENV); - TAO_CHECK_ENV; + names_iterator_tester.test_next_one (ACE_TRY_ENV); + ACE_TRY_CHECK; // Checking the reset () method. - names_iterator_tester.test_reset (TAO_TRY_ENV); - TAO_CHECK_ENV; + names_iterator_tester.test_reset (ACE_TRY_ENV); + ACE_TRY_CHECK; // Iterating again thru the property names. - names_iterator_tester.test_next_one (TAO_TRY_ENV); - TAO_CHECK_ENV; + names_iterator_tester.test_next_one (ACE_TRY_ENV); + ACE_TRY_CHECK; // Reset again. - names_iterator_tester.test_reset (TAO_TRY_ENV); - TAO_CHECK_ENV; + names_iterator_tester.test_reset (ACE_TRY_ENV); + ACE_TRY_CHECK; // Checking next_n. Prints out all the names it has got. - names_iterator_tester.test_next_n (6, TAO_TRY_ENV); - TAO_CHECK_ENV; + names_iterator_tester.test_next_n (6, ACE_TRY_ENV); + ACE_TRY_CHECK; // Try next_n without resetting. - names_iterator_tester.test_next_n (6, TAO_TRY_ENV); - TAO_CHECK_ENV; + names_iterator_tester.test_next_n (6, ACE_TRY_ENV); + ACE_TRY_CHECK; } - TAO_CATCH (CORBA::SystemException, sysex) + ACE_CATCH (CORBA::SystemException, sysex) { - TAO_TRY_ENV.print_exception ("System Exception"); + ACE_TRY_ENV.print_exception ("System Exception"); return -1; } - TAO_CATCH (CORBA::UserException, userex) + ACE_CATCH (CORBA::UserException, userex) { - TAO_TRY_ENV.print_exception ("User Exception"); + ACE_TRY_ENV.print_exception ("User Exception"); return -1; } - TAO_ENDTRY; + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/tests/Property/server.cpp b/TAO/orbsvcs/tests/Property/server.cpp index 8e9cc712b23..b23ecdb1fea 100644 --- a/TAO/orbsvcs/tests/Property/server.cpp +++ b/TAO/orbsvcs/tests/Property/server.cpp @@ -25,7 +25,9 @@ ACE_RCSID(CosPropertyService, server, "$Id$") int main (int argc, char ** argv) { - TAO_TRY + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY { TAO_ORB_Manager m; @@ -33,53 +35,51 @@ main (int argc, char ** argv) m.init_child_poa (argc, argv, "child_poa", - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; // Using naming server. TAO_Naming_Client my_name_client; if (my_name_client.init (m.orb ()) < 0) return 1; - - ACE_DEBUG ((LM_DEBUG, "Name init done\n")); - + // Create PropertySetDef object and register. TAO_PropertySetDef *propsetdef_impl; ACE_NEW_RETURN (propsetdef_impl, TAO_PropertySetDef, -1); CosPropertyService::PropertySetDef_var propsetdef = - propsetdef_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; + propsetdef_impl->_this (ACE_TRY_ENV); + ACE_TRY_CHECK; CosNaming::Name propsetdef_name (1); propsetdef_name.length (1); propsetdef_name[0].id = CORBA::string_dup ("PropertySetDef"); my_name_client->bind (propsetdef_name, propsetdef.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::Any any_val; // Make this IOR as one of the properties in there. - any_val <<= propsetdef_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; + any_val <<= propsetdef_impl->_this (ACE_TRY_ENV); + ACE_TRY_CHECK; - CORBA::Object_var ior = propsetdef_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; + CORBA::Object_var ior = propsetdef_impl->_this (ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::Object_ptr ior_ptr = ior.in (); any_val <<= ior_ptr; // any_val.replace (CORBA::_tc_Object, // &ior_ptr, // 1, - // TAO_TRY_ENV); - // TAO_CHECK_ENV; + // ACE_TRY_ENV); + // ACE_TRY_CHECK; propsetdef_impl->define_property_with_mode ("PropertySetDef_IOR", any_val, CosPropertyService::fixed_readonly, - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; // Create PropertySet factory and then register. TAO_PropertySetFactory *propset_factory_impl; @@ -87,32 +87,34 @@ main (int argc, char ** argv) TAO_PropertySetFactory, -1); CosPropertyService::PropertySetFactory_var propset_factory = - propset_factory_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; + propset_factory_impl->_this (ACE_TRY_ENV); + ACE_TRY_CHECK; CosNaming::Name propset_factory_name (1); propset_factory_name.length (1); propset_factory_name[0].id = CORBA::string_dup ("PropertySetFactory"); my_name_client->bind (propset_factory_name, propset_factory.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; + ACE_TRY_ENV); + ACE_TRY_CHECK; // Run the ORB Event loop. - m.run (TAO_TRY_ENV); - TAO_CHECK_ENV; + m.run (ACE_TRY_ENV); + ACE_TRY_CHECK; } - TAO_CATCH (CORBA::SystemException, sysex) + ACE_CATCH (CORBA::SystemException, 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) { - TAO_TRY_ENV.print_exception ("User Exception"); + ACE_PRINT_EXCEPTION (userex, + "User Exception"); return 1; } - TAO_ENDTRY; + ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "\nServer is terminating")); return 0; |