diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-02 16:22:17 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-02 16:22:17 +0000 |
commit | 6a6073d92af10c8d9ef7a8157fc3330bf75ad5b5 (patch) | |
tree | 6246617821b6e0943900008eeaa1d767c2ea7dcb /TAO | |
parent | fe2c97f8c7465fdafebe7a2db55bc720f9a009b2 (diff) | |
download | ATCD-6a6073d92af10c8d9ef7a8157fc3330bf75ad5b5.tar.gz |
Fri Feb 2 16:16:14 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
181 files changed, 895 insertions, 984 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 1fb9919d4db..613bec8c5f6 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,187 @@ +Fri Feb 2 16:16:14 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp: + * examples/CSD_Strategy/ThreadPool2/ClientApp.cpp: + * examples/CSD_Strategy/ThreadPool2/ServerApp.cpp: + * examples/CSD_Strategy/ThreadPool3/ClientApp.cpp: + * examples/CSD_Strategy/ThreadPool3/ServerApp.cpp: + * examples/CSD_Strategy/ThreadPool4/ServerApp.cpp: + * examples/CSD_Strategy/ThreadPool5/ClientApp.cpp: + * examples/CSD_Strategy/ThreadPool5/ServerApp.cpp: + * examples/CSD_Strategy/ThreadPool6/ClientApp.cpp: + * examples/CSD_Strategy/ThreadPool6/ServerApp.cpp: + * examples/CSD_Strategy/ThreadPool/ClientApp.cpp: + * examples/CSD_Strategy/ThreadPool/ServerApp.cpp: + * examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp: + * examples/Load_Balancing/Load_Balancer_i.cpp: + * examples/Load_Balancing_persistent/Load_Balancer_i.cpp: + * examples/Logging/Logger_i.cpp: + * examples/Persistent_Grid/Grid_i.cpp: + * examples/POA/Default_Servant/File_i.cpp: + * examples/POA/DSI/Database_i.cpp: + * examples/POA/Forwarding/Servant_Activator.cpp: + * examples/POA/Loader/Servant_Activator.cpp: + * examples/POA/Loader/Servant_Locator.cpp: + * examples/POA/On_Demand_Activation/Servant_Activator.cpp: + * examples/POA/On_Demand_Activation/Servant_Locator.cpp: + * examples/POA/On_Demand_Loading/Servant_Activator.cpp: + * examples/POA/On_Demand_Loading/Servant_Locator.cpp: + * examples/Quoter/Factory_Finder_i.cpp: + * examples/Quoter/Generic_Factory_i.cpp: + * examples/Quoter/Quoter_i.cpp: + * examples/Simple/bank/AccountManager_i.cpp: + * examples/Simple/echo/Echo_i.cpp: + * examples/Simple/grid/Grid_i.cpp: + * orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp: + * orbsvcs/examples/CosEC/Factory/FactoryClient.cpp: + * orbsvcs/examples/ImR/Combined_Service/dynserver.cpp: + * orbsvcs/examples/Log/Event/Event_Consumer.cpp: + * orbsvcs/examples/Log/Event/Event_Supplier.cpp: + * orbsvcs/examples/Log/Notify/Notify_Consumer.cpp: + * orbsvcs/examples/Log/Notify/Notify_Supplier.cpp: + * orbsvcs/examples/Log/RTEvent/RTEvent_Consumer.cpp: + * orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp: + * orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp: + * orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp: + * orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp: + * orbsvcs/ImplRepo_Service/Activator_Loader.cpp: + * orbsvcs/ImplRepo_Service/Forwarder.cpp: + * orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp: + * orbsvcs/ImplRepo_Service/Locator_Loader.cpp: + * orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp: + * orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp: + * orbsvcs/LoadBalancer/LoadMonitor.cpp: + * orbsvcs/orbsvcs/AV/AVStreams_i.cpp: + * orbsvcs/orbsvcs/Concurrency/CC_Lock.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_TypedConsumerAdmin.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_TypedSupplierAdmin.cpp: + * orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicyFactory.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_Policy_i.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_PolicyFactory.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicyFactory.cpp: + * orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp: + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp: + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.cpp: + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/FtEventServiceInterceptor.cpp: + * orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp: + * orbsvcs/orbsvcs/IFRService/AliasDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/Container_i.cpp: + * orbsvcs/orbsvcs/IFRService/ExtValueDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/IFR_Service_Loader.cpp: + * orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp: + * orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/Repository_i.cpp: + * orbsvcs/orbsvcs/IFRService/StructDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp: + * orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_LoadAverage.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_ObjectReferenceFactory.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_RoundRobin.cpp: + * orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp: + * orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp: + * orbsvcs/orbsvcs/Log/LogActivator.cpp: + * orbsvcs/orbsvcs/Log/NotifyLog_i.cpp: + * orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp: + * orbsvcs/orbsvcs/Metrics/Metrics_FrameManager_T.inl + * orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp: + * orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp: + * orbsvcs/orbsvcs/Naming/Naming_Client.cpp: + * orbsvcs/orbsvcs/Naming/Naming_Client.h + * orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp: + * orbsvcs/orbsvcs/Naming/Naming_Server.h + * orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp: + * orbsvcs/orbsvcs/Naming/Storable_Naming_Context.cpp: + * orbsvcs/orbsvcs/Naming/Storable_Naming_Context_Activator.cpp: + * orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp: + * orbsvcs/orbsvcs/Notify/Builder.cpp: + * orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp: + * orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp: + * orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp: + * orbsvcs/orbsvcs/Notify/Event_Map_T.cpp: + * orbsvcs/orbsvcs/Notify/FilterAdmin.cpp: + * orbsvcs/orbsvcs/Notify/Find_Worker_T.cpp: + * orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp: + * orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp: + * orbsvcs/orbsvcs/PortableGroup/PG_GenericFactory.cpp: + * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp: + * orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp: + * orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp: + * orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp: + * orbsvcs/orbsvcs/Runtime_Scheduler.cpp: + * orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp: + * orbsvcs/orbsvcs/Security/Security_Current.cpp: + * orbsvcs/orbsvcs/Security/Security_PolicyFactory.cpp: + * orbsvcs/orbsvcs/Security/SL3_CredentialsCurator.cpp: + * orbsvcs/orbsvcs/Security/SL3_PolicyFactory.cpp: + * orbsvcs/orbsvcs/Security/SL3_SecurityCurrent.cpp: + * orbsvcs/orbsvcs/Security/SL3_SecurityManager.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_ClientCredentials.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_OwnCredentials.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_TargetCredentials.cpp: + * orbsvcs/orbsvcs/Time/TAO_Time_Service_Clerk.cpp: + * orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp: + * orbsvcs/orbsvcs/Trader/Offer_Database.cpp: + * orbsvcs/orbsvcs/Trader/Offer_Iterators.cpp: + * orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp: + * orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp: + * orbsvcs/orbsvcs/Trader/Trader_Utils.cpp: + * orbsvcs/tests/Concurrency/CC_command.cpp: + * orbsvcs/tests/CosEvent/lib/Counting_Supplier.cpp: + * orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp: + * orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp: + * orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp: + * orbsvcs/tests/FT_App/FT_TestReplica_i.cpp: + * orbsvcs/tests/FT_App/StubFaultNotifier.cpp: + * orbsvcs/tests/HTIOP/AMI/ami_test_i.cpp: + * orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/Factory.cpp: + * orbsvcs/tests/Notify/Test_Filter/RT_Test_Filter.cpp: + * orbsvcs/tests/Notify/Test_Filter/RT_Test_FilterFactory.cpp: + * performance-tests/CSD_Strategy/TestInf/AppHelper.cpp: + * performance-tests/CSD_Strategy/TestInf/AppHelper.h + * tao/Synch_Invocation.cpp: + * tao/Synch_Queued_Message.cpp: + * tao/SystemException.cpp: + * tao/SystemException.h + * tests/Abstract_Interface/test_i.cpp: + * tests/AMI/ami_test_i.cpp: + * tests/Bug_2234_Regression/server.cpp: + * tests/Client_Leaks/Process_Factory.cpp: + * tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp: + * tests/CSD_Strategy_Tests/TP_Common/AppHelper.h + * tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp: + * tests/File_IO/File_i.cpp: + * tests/MProfile_Forwarding/Servant_Locator.cpp: + * tests/MT_BiDir/Sender_i.cpp: + * tests/OctetSeq/test_i.cpp: + * tests/Param_Test/param_test_i.cpp: + * tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp: + * tests/Smart_Proxies/On_Demand/server.cpp: + * tests/Smart_Proxies/Policy/server.cpp: + * tests/Smart_Proxies/server.cpp: + * utils/catior/catior.cpp: + Layout changes and replaced ACE_THROW_RETURN with throw + Fri Feb 2 14:07:14 2007 Johnny Willemsen <jwillemsen@remedy.nl> * tao/Acceptor_Registry.cpp: @@ -110,7 +294,7 @@ Fri Feb 2 14:07:14 2007 Johnny Willemsen <jwillemsen@remedy.nl> * tao/Unbounded_Array_Sequence_T.h * tao/Utils/RIR_Narrow.cpp: * tao/Valuetype/ValueBase.cpp: - Layout changes and removed ACE_THROW_RETURN + Layout changes and replaced ACE_THROW_RETURN with throw Fri Feb 2 13:32:14 2007 Johnny Willemsen <jwillemsen@remedy.nl> diff --git a/TAO/examples/CSD_Strategy/ThreadPool/ClientApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool/ClientApp.cpp index d3e1d5cb42b..a714c274f5f 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool/ClientApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool/ClientApp.cpp @@ -38,7 +38,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Foo_var foo = Foo::_narrow(obj.in()); @@ -47,7 +47,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to Foo interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } for (CORBA::Long i = 1; i <= 100; i++) diff --git a/TAO/examples/CSD_Strategy/ThreadPool/ServerApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool/ServerApp.cpp index 3f3330912ac..f7aec920724 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool/ServerApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool/ServerApp.cpp @@ -45,7 +45,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var root_poa @@ -55,7 +55,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POAManager_var poa_manager @@ -74,7 +74,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the child POA.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the thread pool servant dispatching strategy object, and @@ -87,7 +87,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the servant object. @@ -108,7 +108,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to activate servant (Foo_i).\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Stringify the object reference @@ -123,7 +123,7 @@ ServerApp::run(int argc, char* argv[]) ACE_ERROR((LM_ERROR, "(%P|%t) Cannot open output file for writing IOR: %s", this->ior_filename_.c_str())); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } ACE_OS::fprintf(ior_file, "%s", ior.in ()); diff --git a/TAO/examples/CSD_Strategy/ThreadPool2/ClientApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool2/ClientApp.cpp index b5ce48c7133..42a35f0c15d 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool2/ClientApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool2/ClientApp.cpp @@ -38,7 +38,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Foo_var foo = Foo::_narrow(obj.in()); @@ -47,7 +47,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to Foo interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } for (CORBA::Long i = 1; i <= 100; i++) diff --git a/TAO/examples/CSD_Strategy/ThreadPool2/ServerApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool2/ServerApp.cpp index 0ea97ea6429..0b30358473b 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool2/ServerApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool2/ServerApp.cpp @@ -48,7 +48,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var root_poa @@ -58,7 +58,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POAManager_var poa_manager @@ -79,7 +79,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the child POA.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } policies[0]->destroy (); @@ -96,7 +96,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } FooServantList servants(this->ior_filename_.c_str(), diff --git a/TAO/examples/CSD_Strategy/ThreadPool3/ClientApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool3/ClientApp.cpp index f5301dfc2d2..f4f861490d6 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool3/ClientApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool3/ClientApp.cpp @@ -38,7 +38,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Foo_var foo = Foo::_narrow(obj.in()); @@ -47,7 +47,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to Foo interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } for (CORBA::Long i = 1; i <= 100; i++) diff --git a/TAO/examples/CSD_Strategy/ThreadPool3/ServerApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool3/ServerApp.cpp index 62a7bb49b6b..8f488b1fe10 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool3/ServerApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool3/ServerApp.cpp @@ -48,7 +48,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var root_poa @@ -58,7 +58,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POAManager_var poa_manager @@ -77,7 +77,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the child POA.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the thread pool servant dispatching strategy object, and @@ -90,7 +90,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the servant object. @@ -111,7 +111,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to activate servant (Foo_i).\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Stringify the object reference @@ -126,7 +126,7 @@ ServerApp::run(int argc, char* argv[]) ACE_ERROR((LM_ERROR, "(%P|%t) Cannot open output file for writing IOR: %s", this->ior_filename_.c_str())); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } ACE_OS::fprintf(ior_file, "%s", ior.in ()); @@ -159,7 +159,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to open the OrbTask.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // This will use the current (mainline) thread to run the ORB event loop. diff --git a/TAO/examples/CSD_Strategy/ThreadPool4/ServerApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool4/ServerApp.cpp index 09a9a31049a..877a651de56 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool4/ServerApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool4/ServerApp.cpp @@ -54,7 +54,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR ((LM_ERROR, " (%P|%t) Panic: nil PolicyManager\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } CORBA::Any policy_value; @@ -79,7 +79,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var root_poa @@ -89,7 +89,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POAManager_var poa_manager @@ -109,7 +109,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the ChildPoa_1.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var child_poa_2 = root_poa->create_POA("ChildPoa_2", @@ -120,7 +120,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the ChildPoa_2.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } policies[0]->destroy (); @@ -139,7 +139,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa 1.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Foo_var foo1 = this->create_foo(child_poa_1.in(), @@ -170,7 +170,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to open the collocated client1.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } ClientTask client2 (foo2.in (), callback2.in ()); @@ -178,7 +178,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to open the collocated client2.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Run the ORB event loop. @@ -270,7 +270,7 @@ ServerApp::create_foo ( ACE_ERROR((LM_ERROR, "(%P|%t) Failed to activate servant (%s).\n", servant_name)); - ACE_THROW_RETURN (TestException(), Foo::_nil ()); + throw TestException(); } Foo_var foo = Foo::_narrow (obj.in ()); @@ -298,7 +298,7 @@ ServerApp::create_callback( ACE_ERROR((LM_ERROR, "(%P|%t) Failed to activate servant (%s).\n", servant_name)); - ACE_THROW_RETURN (TestException(), Callback::_nil ()); + throw TestException(); } Callback_var callback = Callback::_narrow (obj.in ()); diff --git a/TAO/examples/CSD_Strategy/ThreadPool5/ClientApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool5/ClientApp.cpp index ae572aae83e..86374211588 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool5/ClientApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool5/ClientApp.cpp @@ -44,7 +44,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Foo_var foo = Foo::_narrow(obj.in()); @@ -53,7 +53,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to Foo interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the callback object using the child poa with the custom @@ -64,7 +64,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var root_poa @@ -74,7 +74,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POAManager_var poa_manager @@ -93,7 +93,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the child POA.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the thread pool servant dispatching strategy object, and @@ -108,7 +108,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Create the servant object. @@ -129,7 +129,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to activate servant (Callback_i).\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Callback_var callback = Callback::_narrow (obj.in ()); @@ -138,7 +138,7 @@ ClientApp::run(int argc, char* argv[]) if (client_task.open () != 0) { - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // Activate the POA Manager diff --git a/TAO/examples/CSD_Strategy/ThreadPool5/ServerApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool5/ServerApp.cpp index 82162205ef5..25380861656 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool5/ServerApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool5/ServerApp.cpp @@ -53,7 +53,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POA_var root_poa @@ -63,7 +63,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } PortableServer::POAManager_var poa_manager @@ -85,7 +85,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the child POA.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } policies[0]->destroy (); @@ -102,7 +102,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } FooServantList servants(this->ior_filename_.c_str(), @@ -144,7 +144,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to open the OrbTask.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } // This will use the current (mainline) thread to run the ORB event loop. diff --git a/TAO/examples/CSD_Strategy/ThreadPool6/ClientApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool6/ClientApp.cpp index 13d30e1711f..a9e90ec1351 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool6/ClientApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool6/ClientApp.cpp @@ -38,7 +38,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } Foo_var foo = Foo::_narrow(obj.in()); @@ -47,7 +47,7 @@ ClientApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to Foo interface.\n")); - ACE_THROW_RETURN (TestException(), -1); + throw TestException(); } diff --git a/TAO/examples/CSD_Strategy/ThreadPool6/ServerApp.cpp b/TAO/examples/CSD_Strategy/ThreadPool6/ServerApp.cpp index 3fe87380250..4754d132955 100644 --- a/TAO/examples/CSD_Strategy/ThreadPool6/ServerApp.cpp +++ b/TAO/examples/CSD_Strategy/ThreadPool6/ServerApp.cpp @@ -46,7 +46,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for 'RootPOA'.\n")); - ACE_THROW_RETURN (TestException(), -1);; + throw TestException();; } PortableServer::POA_var root_poa @@ -56,7 +56,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to POA interface.\n")); - ACE_THROW_RETURN (TestException(), -1);; + throw TestException();; } PortableServer::POAManager_var poa_manager @@ -78,7 +78,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to create the child POA.\n")); - ACE_THROW_RETURN (TestException(), -1);; + throw TestException();; } policies[0]->destroy (); @@ -93,7 +93,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR [ServerApp::run()]: " "Failed to apply custom dispatching strategy to child poa.\n")); - ACE_THROW_RETURN (TestException(), -1);; + throw TestException();; } // Create the Foo_i object. @@ -109,7 +109,7 @@ ServerApp::run(int argc, char* argv[]) { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to activate servant foo_tie_i.\n")); - ACE_THROW_RETURN (TestException(), -1);; + throw TestException();; } // Stringify the object reference @@ -124,7 +124,7 @@ ServerApp::run(int argc, char* argv[]) ACE_ERROR((LM_ERROR, "(%P|%t) Cannot open output file for writing IOR: %s", this->ior_filename_.c_str())); - ACE_THROW_RETURN (TestException(), -1);; + throw TestException();; } ACE_OS::fprintf(ior_file, "%s", ior.in ()); diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp index b4bfb2755ec..2b1fc2c0ee6 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp @@ -22,8 +22,7 @@ Push_Iterator_Factory_i::register_callback ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { if (CORBA::is_nil (client_callback)) // @@ Will it ever be nil? - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - 0); + throw CORBA::BAD_PARAM (); // What goes on in this method is a bit strange at first glance // since the client can potentially receive all of the data before @@ -54,8 +53,7 @@ Push_Iterator_Factory_i::register_callback if (ACE_OS::stat (pathname, &file_status) == -1) // HTTP 1.1 "Internal Server Error". - ACE_THROW_RETURN (Web_Server::Error_Result (500), - 0); + throw Web_Server::Error_Result (500); Web_Server::Metadata_Type *meta_tmp = 0; ACE_NEW_THROW_EX (meta_tmp, @@ -67,14 +65,12 @@ Push_Iterator_Factory_i::register_callback if (this->modification_date (&file_status, metadata.inout ()) != 0) // HTTP 1.1 "Internal Server Error. - ACE_THROW_RETURN (Web_Server::Error_Result (500), - 0); + throw Web_Server::Error_Result (500); if (this->content_type (pathname, metadata.inout ()) != 0) // HTTP 1.1 "Internal Server Error. - ACE_THROW_RETURN (Web_Server::Error_Result (500), - 0); + throw Web_Server::Error_Result (500); return metadata._retn (); } diff --git a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp index 30b2df14acd..f8b9de0d5e2 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp @@ -711,7 +711,7 @@ CORBA::PolicyList* EDF_Scheduler::scheduling_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -725,14 +725,14 @@ CORBA::PolicyList* EDF_Scheduler::poa_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } char * EDF_Scheduler::scheduling_discipline_name (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } RTScheduling::ResourceManager_ptr @@ -740,7 +740,7 @@ EDF_Scheduler::create_resource_manager (const char *, CORBA::Policy_ptr) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp index fed6b3777bc..8624fdf23c7 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp @@ -605,7 +605,7 @@ CORBA::PolicyList* Fixed_Priority_Scheduler::scheduling_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -619,14 +619,14 @@ CORBA::PolicyList* Fixed_Priority_Scheduler::poa_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } char * Fixed_Priority_Scheduler::scheduling_discipline_name (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } RTScheduling::ResourceManager_ptr @@ -634,7 +634,7 @@ Fixed_Priority_Scheduler::create_resource_manager (const char *, CORBA::Policy_ptr) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp index 73a767d6413..4d88d2fce9f 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp @@ -593,7 +593,7 @@ CORBA::PolicyList* MIF_Scheduler::scheduling_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -607,14 +607,14 @@ CORBA::PolicyList* MIF_Scheduler::poa_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } char * MIF_Scheduler::scheduling_discipline_name (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } RTScheduling::ResourceManager_ptr @@ -622,7 +622,7 @@ MIF_Scheduler::create_resource_manager (const char *, CORBA::Policy_ptr) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp index fdcde8a9872..ac1d00af137 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp @@ -643,7 +643,7 @@ CORBA::PolicyList* MUF_Scheduler::scheduling_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -657,14 +657,14 @@ CORBA::PolicyList* MUF_Scheduler::poa_policies (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } char * MUF_Scheduler::scheduling_discipline_name (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } RTScheduling::ResourceManager_ptr @@ -672,7 +672,7 @@ MUF_Scheduler::create_resource_manager (const char *, CORBA::Policy_ptr) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp index 7206c16db88..9509b8c9a62 100644 --- a/TAO/examples/Load_Balancing/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing/Load_Balancer_i.cpp @@ -62,8 +62,7 @@ Object_Group_Factory_i::make_group (int random, // <id>. if (rr_groups_.find (group_id) == 0 || random_groups_.find (group_id) == 0) - ACE_THROW_RETURN (Load_Balancer::duplicate_group (), - Load_Balancer::Object_Group::_nil ()); + throw Load_Balancer::duplicate_group (); else { // Store our result here for return. @@ -93,8 +92,7 @@ Object_Group_Factory_i::make_group (int random, if (random) { if (random_groups_.bind (group_id, group) == -1) - ACE_THROW_RETURN (CORBA::INTERNAL (), - Load_Balancer::Object_Group::_nil ()); + throw CORBA::INTERNAL (); ACE_DEBUG ((LM_DEBUG, "Load_Balancer: Created new Random Group" @@ -103,8 +101,7 @@ Object_Group_Factory_i::make_group (int random, else { if (rr_groups_.bind (group_id, group) == -1) - ACE_THROW_RETURN (CORBA::INTERNAL (), - Load_Balancer::Object_Group::_nil ()); + throw CORBA::INTERNAL (); ACE_DEBUG ((LM_DEBUG, "Load_Balancer: Created new Round Robin Group" " with id <%s>\n", id)); @@ -124,8 +121,7 @@ Object_Group_Factory_i::resolve (const char * id) if (rr_groups_.find (group_id, group) == -1 && random_groups_.find (group_id, group) == -1) - ACE_THROW_RETURN (Load_Balancer::no_such_group (), - Load_Balancer::Object_Group::_nil ()); + throw Load_Balancer::no_such_group (); else return group._retn (); } @@ -281,8 +277,7 @@ Object_Group_i::resolve_with_id (const char * id) ACE_CString member_id (id); if (members_.find (member_id, obj) == -1) - ACE_THROW_RETURN (Load_Balancer::no_such_member (), - obj._retn ()); + throw Load_Balancer::no_such_member (); return obj._retn (); } @@ -365,8 +360,7 @@ Random_Object_Group::resolve (void) size_t group_size = members_.current_size (); if (group_size == 0) - ACE_THROW_RETURN (Load_Balancer::no_such_member (), - obj._retn ()); + throw Load_Balancer::no_such_member (); // Generate random number in the range [0, group_size - 1] size_t member = ACE_OS::rand() % group_size; @@ -415,8 +409,7 @@ RR_Object_Group::resolve (void) size_t group_size = members_.current_size (); if (group_size == 0) - ACE_THROW_RETURN (Load_Balancer::no_such_member (), - obj._retn ()); + throw Load_Balancer::no_such_member (); // Get the id of the member to return to the client. ACE_CString *id = 0; @@ -431,8 +424,7 @@ RR_Object_Group::resolve (void) // Return the object reference corresponding to the found id to the client. if (members_.find (*id, obj) == -1) - ACE_THROW_RETURN (CORBA::INTERNAL (), - CORBA::Object::_nil ()); + throw CORBA::INTERNAL (); return obj._retn (); } diff --git a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp index cf89d7d37c3..03c11879840 100644 --- a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp @@ -201,15 +201,13 @@ Object_Group_Factory_i::make_group (int random, { if (this->random_groups_->find (const_cast<char *> (id), this->mem_pool_) == 0) - ACE_THROW_RETURN (Load_Balancer::duplicate_group (), - Load_Balancer::Object_Group::_nil ()); + throw Load_Balancer::duplicate_group (); } else { if (this->rr_groups_->find (const_cast<char *> (id), this->mem_pool_) == 0) - ACE_THROW_RETURN (Load_Balancer::duplicate_group (), - Load_Balancer::Object_Group::_nil ()); + throw Load_Balancer::duplicate_group (); } @@ -243,8 +241,7 @@ Object_Group_Factory_i::make_group (int random, char *ptr = (char *) this->mem_pool_->malloc (id_len + kind_len); if (ptr == 0) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), - Load_Balancer::Object_Group::_nil ()); + throw CORBA::NO_MEMORY (); char * id_ptr = ptr; char * ior_ptr = ptr + id_len; @@ -279,8 +276,7 @@ Object_Group_Factory_i::make_group (int random, // For some reason the bind failed. Free our // dynamically allocated memory. this->mem_pool_->free ((void *) ptr); - ACE_THROW_RETURN (Load_Balancer::duplicate_group (), - Load_Balancer::Object_Group::_nil ()); + throw Load_Balancer::duplicate_group (); } @@ -352,8 +348,7 @@ Object_Group_Factory_i::resolve (const char * id) && random_groups_->find (const_cast<char *> (id), ior, this->mem_pool_) == -1) - ACE_THROW_RETURN (Load_Balancer::no_such_group (), - 0); + throw Load_Balancer::no_such_group (); CORBA::Object_var objref = this->orb_->string_to_object (ior); @@ -726,8 +721,7 @@ Object_Group_i::resolve_with_id (const char * id) if (this->members_->find (const_cast<char *> (id), ior.out (), this->allocator_) == -1) - ACE_THROW_RETURN (Load_Balancer::no_such_member (), - 0); + throw Load_Balancer::no_such_member (); char *retn_ptr = CORBA::string_dup (ior.in ()); @@ -834,8 +828,7 @@ Random_Object_Group::resolve (void) size_t group_size = this->members_->current_size (); if (group_size == 0) - ACE_THROW_RETURN (Load_Balancer::no_such_member (), - 0); + throw Load_Balancer::no_such_member (); // Generate random number in the range [0, group_size - 1] size_t member = ACE_OS::rand() % group_size; @@ -874,8 +867,7 @@ RR_Object_Group::resolve (void) size_t group_size = this->members_->current_size (); if (group_size == 0) - ACE_THROW_RETURN (Load_Balancer::no_such_member (), - 0); + throw Load_Balancer::no_such_member (); // Get the id of the member to return to the client. char **id = 0; @@ -891,8 +883,7 @@ RR_Object_Group::resolve (void) if (this->members_->find (*id, objref, this->allocator_) == -1) - ACE_THROW_RETURN (CORBA::INTERNAL (), - 0); + throw CORBA::INTERNAL (); char *retn_ptr = CORBA::string_dup (objref); diff --git a/TAO/examples/Logging/Logger_i.cpp b/TAO/examples/Logging/Logger_i.cpp index 8f9b28bd67a..b852854e2f7 100644 --- a/TAO/examples/Logging/Logger_i.cpp +++ b/TAO/examples/Logging/Logger_i.cpp @@ -46,8 +46,7 @@ Logger_Factory_i::make_logger (const char *name) if (hash_map_.bind (name, result) == -1) { delete result; - ACE_THROW_RETURN (CORBA::UNKNOWN (), - Logger::_nil ()); + throw CORBA::UNKNOWN (); } else // Logger of name <name> already bound. <result> is set diff --git a/TAO/examples/POA/DSI/Database_i.cpp b/TAO/examples/POA/DSI/Database_i.cpp index 3395bbc3385..53c0095e5d1 100644 --- a/TAO/examples/POA/DSI/Database_i.cpp +++ b/TAO/examples/POA/DSI/Database_i.cpp @@ -143,8 +143,7 @@ DatabaseImpl::Agent::create_entry (const char *key, // Create a new entry in the database: if (ACE_OS::strcmp (entry_type, "Employee") != 0 || initial_attributes.length () != 2) - ACE_THROW_RETURN (Database::Unknown_Type (), - Database::Entry::_nil ()); + throw Database::Unknown_Type (); const char *name = 0; CORBA::Long id = 0; @@ -156,8 +155,7 @@ DatabaseImpl::Agent::create_entry (const char *key, if (ACE_OS::strcmp (first.name.in (), "name") != 0 || ACE_OS::strcmp (second.name.in (), "id") != 0) - ACE_THROW_RETURN (Database::Unknown_Type (), - Database::Entry::_nil ()); + throw Database::Unknown_Type (); first.value >>= name; second.value >>= id; @@ -205,8 +203,7 @@ DatabaseImpl::Agent::find_entry (const char *key, { if (ACE_OS::strcmp (entry_type, "Employee") != 0) - ACE_THROW_RETURN (Database::Unknown_Type (), - Database::Entry::_nil ()); + throw Database::Unknown_Type (); void *temp; Database::Entry_var entry; @@ -239,8 +236,7 @@ DatabaseImpl::Agent::find_entry (const char *key, "Employee with key = %s not found\n", key)); - ACE_THROW_RETURN (Database::Not_Found (), - Database::Entry::_nil ()); + throw Database::Not_Found (); } return entry._retn (); diff --git a/TAO/examples/POA/Default_Servant/File_i.cpp b/TAO/examples/POA/Default_Servant/File_i.cpp index 0728e000e67..2ee888fd647 100644 --- a/TAO/examples/POA/Default_Servant/File_i.cpp +++ b/TAO/examples/POA/Default_Servant/File_i.cpp @@ -55,7 +55,7 @@ FileImpl::System::open (const char *file_name, if (file_descriptor == ACE_INVALID_HANDLE) { - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); } char file_descriptor_buffer[BUFSIZ]; @@ -165,7 +165,7 @@ FileImpl::Descriptor::write (const File::Descriptor::DataBuffer &buffer) if (len > 0) return len; - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); } File::Descriptor::DataBuffer * @@ -185,7 +185,7 @@ FileImpl::Descriptor::read (CORBA::Long num_bytes) 1); File::Descriptor::DataBuffer::freebuf (buffer); - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); } CORBA::ULong @@ -200,7 +200,7 @@ FileImpl::Descriptor::lseek (CORBA::ULong offset, offset, whence); if (result == -1) - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); return (CORBA::ULong) result; } diff --git a/TAO/examples/POA/Forwarding/Servant_Activator.cpp b/TAO/examples/POA/Forwarding/Servant_Activator.cpp index eedc9664cb6..891aff8e682 100644 --- a/TAO/examples/POA/Forwarding/Servant_Activator.cpp +++ b/TAO/examples/POA/Forwarding/Servant_Activator.cpp @@ -21,10 +21,7 @@ ServantActivator::incarnate (const PortableServer::ObjectId &, this->orb_->shutdown (0); // Throw forward exception - ACE_THROW_RETURN ( - PortableServer::ForwardRequest ( - this->forward_to_.in ()), - 0); + throw PortableServer::ForwardRequest (this->forward_to_.in ()); } void diff --git a/TAO/examples/POA/Loader/Servant_Activator.cpp b/TAO/examples/POA/Loader/Servant_Activator.cpp index c3f24418416..feb09fc5c5a 100644 --- a/TAO/examples/POA/Loader/Servant_Activator.cpp +++ b/TAO/examples/POA/Loader/Servant_Activator.cpp @@ -76,8 +76,7 @@ ServantActivator::incarnate (const PortableServer::ObjectId &oid, if (servant != 0) return servant; else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); + throw CORBA::OBJECT_NOT_EXIST (); } // This is the method invoked when the object is deactivated or the diff --git a/TAO/examples/POA/Loader/Servant_Locator.cpp b/TAO/examples/POA/Loader/Servant_Locator.cpp index 5a0442e04b7..2b3644104b2 100644 --- a/TAO/examples/POA/Loader/Servant_Locator.cpp +++ b/TAO/examples/POA/Loader/Servant_Locator.cpp @@ -86,8 +86,7 @@ ServantLocator::preinvoke (const PortableServer::ObjectId &oid, return servant; } else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); + throw CORBA::OBJECT_NOT_EXIST (); } // Since the servant gets invoked per operation, the servant has to be diff --git a/TAO/examples/POA/On_Demand_Activation/Servant_Activator.cpp b/TAO/examples/POA/On_Demand_Activation/Servant_Activator.cpp index 2f445782f5b..034c49d82aa 100644 --- a/TAO/examples/POA/On_Demand_Activation/Servant_Activator.cpp +++ b/TAO/examples/POA/On_Demand_Activation/Servant_Activator.cpp @@ -47,7 +47,7 @@ ServantActivator::incarnate (const PortableServer::ObjectId &oid, return new test_i (this->orb_.in (), poa); else { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } } diff --git a/TAO/examples/POA/On_Demand_Activation/Servant_Locator.cpp b/TAO/examples/POA/On_Demand_Activation/Servant_Locator.cpp index 93b1b8c6e3b..932642e18d9 100644 --- a/TAO/examples/POA/On_Demand_Activation/Servant_Locator.cpp +++ b/TAO/examples/POA/On_Demand_Activation/Servant_Locator.cpp @@ -59,7 +59,7 @@ ServantLocator::preinvoke (const PortableServer::ObjectId &oid, } else { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } } diff --git a/TAO/examples/POA/On_Demand_Loading/Servant_Activator.cpp b/TAO/examples/POA/On_Demand_Loading/Servant_Activator.cpp index 5a30dec4d78..7619f8ab89a 100644 --- a/TAO/examples/POA/On_Demand_Loading/Servant_Activator.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Servant_Activator.cpp @@ -49,8 +49,7 @@ ServantActivator_i::incarnate (const PortableServer::ObjectId &oid, if (servant != 0) return servant; else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); + throw CORBA::OBJECT_NOT_EXIST (); } // This is the method invoked when the object is deactivated or the diff --git a/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp b/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp index 6e9f9f60340..71b4174d92c 100644 --- a/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp @@ -60,8 +60,7 @@ ServantLocator_i::preinvoke (const PortableServer::ObjectId &oid, return servant; } else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); + throw CORBA::OBJECT_NOT_EXIST (); } // Since the servant gets invoked per operation, the servant has to be diff --git a/TAO/examples/Persistent_Grid/Grid_i.cpp b/TAO/examples/Persistent_Grid/Grid_i.cpp index 05197509721..b5dac673d49 100644 --- a/TAO/examples/Persistent_Grid/Grid_i.cpp +++ b/TAO/examples/Persistent_Grid/Grid_i.cpp @@ -85,7 +85,7 @@ Grid_i::get (CORBA::Short x, || y < 0 || x >= width_ || y >= height_) - ACE_THROW_RETURN (Grid::RANGE_ERROR (), -1); + throw Grid::RANGE_ERROR (); else return array_[x][y]; } @@ -192,7 +192,7 @@ Grid_Factory_i::make_grid (CORBA::Short width, height, pool_t_); if (errno == ENOMEM) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + throw CORBA::NO_MEMORY (); errno = prev_no; diff --git a/TAO/examples/Quoter/Factory_Finder_i.cpp b/TAO/examples/Quoter/Factory_Finder_i.cpp index 760a754b968..5d72123e647 100644 --- a/TAO/examples/Quoter/Factory_Finder_i.cpp +++ b/TAO/examples/Quoter/Factory_Finder_i.cpp @@ -77,7 +77,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key) // Check if it is a valid Quoter Factory reference if (CORBA::is_nil (quoterFactoryObject_var.in())) - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), 0); + throw CosLifeCycle::NoFactory (factory_key); // create a sequence of factories object factories_ptr = new CosLifeCycle::Factories (1); @@ -87,7 +87,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key) // Check if it is a valid Quoter Factory reference. if (CORBA::is_nil (quoterFactoryObject_var.in ())) // throw a NoFactory exception. - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), 0); + throw CosLifeCycle::NoFactory (factory_key); // insert the object reference (*factories_ptr)[0] = CORBA::Object::_duplicate (quoterFactoryObject_var.in()); @@ -99,7 +99,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key) catch (const CORBA::Exception&) { ACE_ERROR ((LM_ERROR, "Quoter_Factory_Finder::find_factories - %s\n", exception_message)); - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), 0); + throw CosLifeCycle::NoFactory (factory_key); } return factories_ptr; diff --git a/TAO/examples/Quoter/Generic_Factory_i.cpp b/TAO/examples/Quoter/Generic_Factory_i.cpp index b8b31a9f546..298459a9648 100644 --- a/TAO/examples/Quoter/Generic_Factory_i.cpp +++ b/TAO/examples/Quoter/Generic_Factory_i.cpp @@ -79,8 +79,7 @@ Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_k } catch (const CORBA::Exception&) { - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), - CosNaming::NamingContext::_nil ()); + throw CosLifeCycle::NoFactory (factory_key); } return quoterNamingContext_var._retn (); } @@ -152,8 +151,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, } catch (const CORBA::Exception&) { - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), - CORBA::Object::_nil ()); + throw CosLifeCycle::NoFactory (factory_key); } return quoter_var._retn (); } diff --git a/TAO/examples/Quoter/Quoter_i.cpp b/TAO/examples/Quoter/Quoter_i.cpp index 98c7dbcbc5c..a359d918ee9 100644 --- a/TAO/examples/Quoter/Quoter_i.cpp +++ b/TAO/examples/Quoter/Quoter_i.cpp @@ -218,8 +218,7 @@ CosLifeCycle::LifeCycleObject::_nil (); ACE_ERROR ((LM_ERROR, "Quoter::copy: Last factory did not work. \n" "No more factories are available. I give up.\n")); - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factoryKey), - CosLifeCycle::LifeCycleObject::_nil()); + throw CosLifeCycle::NoFactory (factoryKey); } else { diff --git a/TAO/examples/Simple/bank/AccountManager_i.cpp b/TAO/examples/Simple/bank/AccountManager_i.cpp index c8f2efdecb5..51befcb7a8d 100644 --- a/TAO/examples/Simple/bank/AccountManager_i.cpp +++ b/TAO/examples/Simple/bank/AccountManager_i.cpp @@ -73,8 +73,7 @@ AccountManager_i::open (const char *name, if (hash_map_.bind (name, result) == -1) { delete result; - ACE_THROW_RETURN (CORBA::UNKNOWN (), - Bank::Account::_nil ()); + throw CORBA::UNKNOWN (); } } else if (TAO_debug_level > 0) diff --git a/TAO/examples/Simple/echo/Echo_i.cpp b/TAO/examples/Simple/echo/Echo_i.cpp index 64bdb6e52f3..ccb84e7bb07 100644 --- a/TAO/examples/Simple/echo/Echo_i.cpp +++ b/TAO/examples/Simple/echo/Echo_i.cpp @@ -73,7 +73,7 @@ Echo_i::echo_string (const char *mesg) // raised. if (str.in () == 0) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + throw CORBA::NO_MEMORY (); // Got thru! now, make a deep copy of the mesg string and send it // back to the client. diff --git a/TAO/examples/Simple/grid/Grid_i.cpp b/TAO/examples/Simple/grid/Grid_i.cpp index 47998c5d449..f78783ce7eb 100644 --- a/TAO/examples/Simple/grid/Grid_i.cpp +++ b/TAO/examples/Simple/grid/Grid_i.cpp @@ -72,7 +72,7 @@ Grid_i::get (CORBA::Short x, || y < 0 || x >= width_ || y >= height_) - ACE_THROW_RETURN (Grid::RANGE_ERROR (), -1); + throw Grid::RANGE_ERROR (); else return array_[x][y]; } diff --git a/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp b/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp index 45cfae40bcf..0d064530b33 100644 --- a/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp +++ b/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp @@ -62,7 +62,7 @@ CORBA::Object_ptr EventChannelFactory_i::create_object ( throw; } - ACE_THROW_RETURN(PortableGroup::ObjectNotCreated(), CORBA::Object::_nil()); + throw PortableGroup::ObjectNotCreated(); } void EventChannelFactory_i::delete_object ( diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp index 2d5d6c1084f..3446bccf877 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp @@ -450,7 +450,7 @@ TAO::FT_ReplicationManager::get_fault_notifier () { if (CORBA::is_nil (this->fault_notifier_.in ())) { - ACE_THROW_RETURN ( FT::InterfaceNotFound () , FT::FaultNotifier::_nil ()); + throw FT::InterfaceNotFound (); } return FT::FaultNotifier::_duplicate (this->fault_notifier_.in ()); } @@ -488,7 +488,7 @@ char * TAO::FT_ReplicationManager::type_id ( } else { - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), 0); + throw PortableGroup::ObjectGroupNotFound (); } return result; } @@ -604,7 +604,7 @@ TAO::FT_ReplicationManager::get_properties ( } else { - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), 0); + throw PortableGroup::ObjectGroupNotFound (); } return result._retn(); } @@ -643,12 +643,12 @@ TAO::FT_ReplicationManager::set_primary_member ( } else { - ACE_THROW_RETURN (FT::PrimaryNotSet (), PortableGroup::ObjectGroup::_nil ()); + throw FT::PrimaryNotSet (); } } else { - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectGroupNotFound (); } METHOD_RETURN (TAO::FT_ReplicationManager::set_primary_member) result._retn (); } @@ -683,7 +683,7 @@ TAO::FT_ReplicationManager::create_member ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::create_member: unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result._retn ()); + throw PortableGroup::ObjectGroupNotFound (); } return result._retn(); } @@ -722,7 +722,7 @@ TAO::FT_ReplicationManager::add_member ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::add_member to unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result._retn ()); + throw PortableGroup::ObjectGroupNotFound (); } METHOD_RETURN (TAO::FT_ReplicationManager::add_member) result._retn (); } @@ -753,7 +753,7 @@ TAO::FT_ReplicationManager::remove_member ( } else { - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result._retn ()); + throw PortableGroup::ObjectGroupNotFound (); } return result._retn (); } @@ -781,7 +781,7 @@ TAO::FT_ReplicationManager::locations_of_members ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::locations_of_members: unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), 0); + throw PortableGroup::ObjectGroupNotFound (); } return result; } @@ -817,7 +817,7 @@ TAO::FT_ReplicationManager::get_object_group_id ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::get_object_group_id: unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result); + throw PortableGroup::ObjectGroupNotFound (); } return result; } @@ -845,7 +845,7 @@ TAO::FT_ReplicationManager::get_object_group_ref ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::get_object_group_ref: unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result._retn ()); + throw PortableGroup::ObjectGroupNotFound (); } return result._retn(); } @@ -875,7 +875,7 @@ TAO::FT_ReplicationManager::get_object_group_ref_from_id ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::get_object_group_ref_from_id: unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result._retn ()); + throw PortableGroup::ObjectGroupNotFound (); } return result._retn(); } @@ -905,7 +905,7 @@ TAO::FT_ReplicationManager::get_member_ref ( ACE_TEXT ("%T %n (%P|%t) - FT_ReplicationManager::get_member_ref: unknown group\n") )); } - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), result._retn ()); + throw PortableGroup::ObjectGroupNotFound (); } return result._retn(); } diff --git a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp index df556a7c958..4eaa9a6bf19 100644 --- a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp +++ b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp @@ -594,7 +594,7 @@ CORBA::Object_ptr TAO::FT_FaultDetectorFactory_i::create_object ( "Throwing 'InvalidCriteria' due to missing %s\n", missingParameterName )); - ACE_THROW_RETURN ( PortableGroup::InvalidCriteria(), CORBA::Object::_nil () ); + throw PortableGroup::InvalidCriteria(); } CORBA::ULong detectorId = allocate_id(); @@ -617,7 +617,7 @@ CORBA::Object_ptr TAO::FT_FaultDetectorFactory_i::create_object ( ACE_ERROR ((LM_ERROR, "New FaultDetector_i returned NULL. Throwing ObjectNotCreated.\n" )); - ACE_THROW_RETURN ( PortableGroup::ObjectNotCreated(), CORBA::Object::_nil () ); + throw PortableGroup::ObjectNotCreated(); } auto_ptr<TAO::Fault_Detector_i> detector(pFD); @@ -629,7 +629,7 @@ CORBA::Object_ptr TAO::FT_FaultDetectorFactory_i::create_object ( "New factory_creation_id returned NULL. Throwing ObjectNotCreated.\n" )); - ACE_THROW_RETURN ( PortableGroup::ObjectNotCreated(), CORBA::Object::_nil ()); + throw PortableGroup::ObjectNotCreated(); } (*factory_creation_id) <<= detectorId; diff --git a/TAO/orbsvcs/ImplRepo_Service/Activator_Loader.cpp b/TAO/orbsvcs/ImplRepo_Service/Activator_Loader.cpp index 67044b8191c..de47e349eb3 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Activator_Loader.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Activator_Loader.cpp @@ -80,7 +80,7 @@ ImR_Activator_Loader::create_object (CORBA::ORB_ptr, ACE_TCHAR **) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN(CORBA::NO_IMPLEMENT (), CORBA::Object::_nil ()); + throw CORBA::NO_IMPLEMENT (); } int diff --git a/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp b/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp index 6f4b0b2830c..cf596ceff99 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp @@ -140,12 +140,14 @@ ImR_Forwarder::preinvoke (const PortableServer::ObjectId &, } if (!CORBA::is_nil (forward_obj.in ())) - ACE_THROW_RETURN (PortableServer::ForwardRequest (forward_obj.in ()), 0); + throw PortableServer::ForwardRequest (forward_obj.in ()); ACE_ERROR ((LM_ERROR, "Error: Forward_to reference is nil.\n")); - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST ( - CORBA::SystemException::_tao_minor_code (TAO_IMPLREPO_MINOR_CODE, 0), - CORBA::COMPLETED_NO), 0); + throw CORBA::OBJECT_NOT_EXIST ( + CORBA::SystemException::_tao_minor_code ( + TAO_IMPLREPO_MINOR_CODE, + 0), + CORBA::COMPLETED_NO); } void diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp index 7b9dfe74f2f..d2e1a00db29 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp @@ -483,7 +483,7 @@ ACE_THROW_SPEC ((CORBA::SystemException, if (info.null ()) { ACE_ERROR ((LM_ERROR, "ImR: Cannot find info for server <%s>\n", name)); - ACE_THROW_RETURN (ImplementationRepository::NotFound (), 0); + throw ImplementationRepository::NotFound (); } return activate_server_i (*info, manual_start); @@ -546,8 +546,9 @@ ACE_THROW_SPEC ((CORBA::SystemException, waiter_svt_.unblock_all (info.name.c_str ()); - ACE_THROW_RETURN (ImplementationRepository::CannotActivate - (CORBA::string_dup ("Cannot start server.")), 0); + throw ImplementationRepository::CannotActivate( + CORBA::string_dup ( + "Cannot start server.")); } // Note: We already updated info with StartupInfo in server_is_running () @@ -593,8 +594,9 @@ ACE_THROW_SPEC ((CORBA::SystemException, ACE_DEBUG ((LM_DEBUG, "ImR: Cannot Activate <%s>.\n", info.name.c_str ())); } - ACE_THROW_RETURN (ImplementationRepository::CannotActivate - (CORBA::string_dup ("Cannot start server.")), 0); + throw ImplementationRepository::CannotActivate( + CORBA::string_dup ( + "Cannot start server.")); } ImplementationRepository::StartupInfo* @@ -608,16 +610,18 @@ ACE_THROW_SPEC ((CORBA::SystemException, { if (debug_ > 0) ACE_DEBUG ((LM_DEBUG, "ImR: Cannot start server <%s>. ActivationMode=MANUAL\n", info.name.c_str ())); - ACE_THROW_RETURN (ImplementationRepository::CannotActivate - (CORBA::string_dup ("Cannot implicitly activate MANUAL server.")), 0); + throw ImplementationRepository::CannotActivate( + CORBA::string_dup ( + "Cannot implicitly activate MANUAL server.")); } if (info.cmdline.length () == 0) { if (debug_ > 0) ACE_DEBUG ((LM_DEBUG, "ImR: Cannot start server <%s>." " No command line.\n", info.name.c_str ())); - ACE_THROW_RETURN (ImplementationRepository::CannotActivate - (CORBA::string_dup ("No command line registered for server.")), 0); + throw ImplementationRepository::CannotActivate( + CORBA::string_dup ( + "No command line registered for server.")); } Activator_Info_Ptr ainfo = get_activator (info.activator); @@ -627,8 +631,9 @@ ACE_THROW_SPEC ((CORBA::SystemException, if (debug_ > 0) ACE_DEBUG ((LM_DEBUG, "ImR: Cannot start server <%s>. " "Activator <%s> not found.\n", info.name.c_str (), info.activator.c_str ())); - ACE_THROW_RETURN (ImplementationRepository::CannotActivate - (CORBA::string_dup ("No activator registered for server.")), 0); + throw ImplementationRepository::CannotActivate( + CORBA::string_dup ( + "No activator registered for server.")); } try diff --git a/TAO/orbsvcs/ImplRepo_Service/Locator_Loader.cpp b/TAO/orbsvcs/ImplRepo_Service/Locator_Loader.cpp index 36d09e380e6..da0fc913da9 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Locator_Loader.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Locator_Loader.cpp @@ -74,7 +74,7 @@ ImR_Locator_Loader::create_object (CORBA::ORB_ptr, ACE_TCHAR**) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT(), CORBA::Object::_nil ()); + throw CORBA::NO_IMPLEMENT(); } int diff --git a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp index bbb2430d7ee..bb6be70b13c 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp +++ b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp @@ -36,9 +36,8 @@ Criteria_Evaluator::getInitialization (void) this->getCriteriaMember ("initialization"); if (any_ptr == 0) - ACE_THROW_RETURN (LifeCycleService::Criteria_Evaluator::NotAvailable - ("No initialization member found.\n"), - 0); + throw LifeCycleService::Criteria_Evaluator::NotAvailable( + "No initialization member found.\n"); *any_ptr >>= sequence_ptr; @@ -53,9 +52,8 @@ Criteria_Evaluator::getFilter (void) CORBA::Any_ptr any_ptr = this->getCriteriaMember ("filter"); if (any_ptr == 0) - ACE_THROW_RETURN (LifeCycleService::Criteria_Evaluator::NotAvailable - ("No filter member found.\n"), - 0); + throw LifeCycleService::Criteria_Evaluator::NotAvailable( + "No filter member found.\n"); *any_ptr >>= string; return CORBA::string_dup (string); } diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp index 0bf2b51d52f..4fe8a698fa7 100644 --- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp +++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp @@ -89,7 +89,7 @@ Life_Cycle_Service_i::create_object (const CosLifeCycle::Key &factory_key, // Check if it is a valid Generic Factory reference if (CORBA::is_nil (genericFactoryObj_ptr)) - ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), 0); + throw CosLifeCycle::NoFactory (factory_key); else { CosLifeCycle::GenericFactory_var genericFactory_var; diff --git a/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp b/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp index d2f4003bb36..0b67b92f0b4 100644 --- a/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp +++ b/TAO/orbsvcs/LoadBalancer/LoadMonitor.cpp @@ -177,8 +177,7 @@ get_load_monitor (CORBA::ORB_ptr orb, ACE_TEXT ("unimplemented.\n"), ::mtype)); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CosLoadBalancing::LoadMonitor::_nil ()); + throw CORBA::NO_IMPLEMENT (); } else { @@ -187,8 +186,7 @@ get_load_monitor (CORBA::ORB_ptr orb, ACE_TEXT ("type: <%s>.\n"), ::mtype)); - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CosLoadBalancing::LoadMonitor::_nil ()); + throw CORBA::BAD_PARAM (); } } } diff --git a/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp b/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp index 9ec72d46d84..bbf168f2d44 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp @@ -124,43 +124,35 @@ TAO_CosEventChannelFactory_i::create (const char * channel_id, } catch (const PortableServer::POA::ServantAlreadyActive&) { - ACE_THROW_RETURN (CosEventChannelFactory::DuplicateChannel (), - ec_return._retn ()); + throw CosEventChannelFactory::DuplicateChannel (); } catch (const PortableServer::POA::ObjectAlreadyActive&) { - ACE_THROW_RETURN (CosEventChannelFactory::DuplicateChannel (), - ec_return._retn ()); + throw CosEventChannelFactory::DuplicateChannel (); } catch (const PortableServer::POA::WrongPolicy&) { - ACE_THROW_RETURN (CORBA::UNKNOWN (), - ec_return._retn ()); + throw CORBA::UNKNOWN (); } catch (const PortableServer::POA::ObjectNotActive&) { - ACE_THROW_RETURN (CosEventChannelFactory::BindFailed (), - ec_return._retn ()); + throw CosEventChannelFactory::BindFailed (); } catch (const CosNaming::NamingContext::NotFound&) { - ACE_THROW_RETURN (CosEventChannelFactory::BindFailed (), - ec_return._retn ()); + throw CosEventChannelFactory::BindFailed (); } catch (const CosNaming::NamingContext::CannotProceed&) { - ACE_THROW_RETURN (CosEventChannelFactory::BindFailed (), - ec_return._retn ()); + throw CosEventChannelFactory::BindFailed (); } catch (const CosNaming::NamingContext::InvalidName&) { - ACE_THROW_RETURN (CosEventChannelFactory::BindFailed (), - ec_return._retn ()); + throw CosEventChannelFactory::BindFailed (); } catch (const CosNaming::NamingContext::AlreadyBound&) { - ACE_THROW_RETURN (CosEventChannelFactory::BindFailed (), - ec_return._retn ()); + throw CosEventChannelFactory::BindFailed (); } return ec_return._retn (); @@ -248,8 +240,7 @@ TAO_CosEventChannelFactory_i::find } catch (const CORBA::UserException&)// Translate any user exception. { - ACE_THROW_RETURN (CosEventChannelFactory::NoSuchChannel (), - ec_return._retn ()); + throw CosEventChannelFactory::NoSuchChannel (); } return ec_return._retn (); @@ -277,8 +268,7 @@ TAO_CosEventChannelFactory_i::find_channel_id } catch (const CORBA::UserException&)// Translate any user exception. { - ACE_THROW_RETURN (CosEventChannelFactory::NoSuchChannel (), - str_return._retn ()); + throw CosEventChannelFactory::NoSuchChannel (); } return str_return._retn (); diff --git a/TAO/orbsvcs/examples/CosEC/Factory/FactoryClient.cpp b/TAO/orbsvcs/examples/CosEC/Factory/FactoryClient.cpp index 44632007a6a..34a7b2c47a7 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/FactoryClient.cpp +++ b/TAO/orbsvcs/examples/CosEC/Factory/FactoryClient.cpp @@ -125,8 +125,7 @@ FactoryClient::resolve_factory (void) CosEventChannelFactory::ChannelFactory_ptr FactoryClient::create_factory (void) { - ACE_THROW_RETURN (CORBA::UNKNOWN (), - CosEventChannelFactory::ChannelFactory::_nil ()); + throw CORBA::UNKNOWN (); } CosEventChannelAdmin::EventChannel_ptr diff --git a/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp b/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp index 2ee3c788095..44a9d2f175c 100644 --- a/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp +++ b/TAO/orbsvcs/examples/ImR/Combined_Service/dynserver.cpp @@ -146,7 +146,7 @@ DynServer_Loader::create_object (ORB_ptr, ACE_TCHAR **) ACE_THROW_SPEC ((SystemException)) { - ACE_THROW_RETURN(NO_IMPLEMENT(), Object::_nil()); + throw NO_IMPLEMENT(); } ACE_FACTORY_DEFINE (DynServer, DynServer_Loader) diff --git a/TAO/orbsvcs/examples/Log/Event/Event_Consumer.cpp b/TAO/orbsvcs/examples/Log/Event/Event_Consumer.cpp index e6d645a3dcf..5ee4a7ce293 100644 --- a/TAO/orbsvcs/examples/Log/Event/Event_Consumer.cpp +++ b/TAO/orbsvcs/examples/Log/Event/Event_Consumer.cpp @@ -51,7 +51,7 @@ Consumer::run (int argc, char* argv[]) // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) - ACE_THROW_RETURN (CORBA::UNKNOWN (),0); + throw CORBA::UNKNOWN (); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in ()); diff --git a/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp b/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp index 45488c716f9..45100a53b9b 100644 --- a/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp +++ b/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp @@ -50,7 +50,7 @@ Supplier::run (int argc, char* argv[]) // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in ()); diff --git a/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp b/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp index af6f21550b9..3d20b0ed0dc 100644 --- a/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp +++ b/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.cpp @@ -59,7 +59,7 @@ Consumer::run (int argc, char* argv[]) // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in ()); diff --git a/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp b/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp index 294f8a1072c..b0ace66c5a9 100644 --- a/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp +++ b/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp @@ -52,7 +52,7 @@ Supplier::run (int argc, char* argv[]) // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in ()); diff --git a/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Consumer.cpp b/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Consumer.cpp index 0aa9a6327b9..1f1cfb0d4ee 100644 --- a/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Consumer.cpp +++ b/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Consumer.cpp @@ -69,7 +69,7 @@ Consumer::run (int argc, char* argv[]) // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in ()); diff --git a/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp b/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp index fecdb698eaf..3564e963677 100644 --- a/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp +++ b/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp @@ -76,7 +76,7 @@ Supplier::run (int argc, char* argv[]) // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in ()); diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp index 3c7269ca701..72ed28c6201 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp @@ -266,7 +266,7 @@ TAO_Basic_StreamCtrl::get_flow_connection (const char *flow_name) } else{ if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%N,%l) Cannot find flow: %s\n", flow_name )); - ACE_THROW_RETURN (AVStreams::noSuchFlow (), CORBA::Object::_nil ()); + throw AVStreams::noSuchFlow (); } } @@ -2334,7 +2334,7 @@ TAO_StreamEndPoint::add_fep (CORBA::Object_ptr fep_obj) ACE_CString fep_name_key (CORBA::string_dup (flow_name.in ())); if (this->fep_map_.bind (fep_name_key, AVStreams::FlowEndPoint::_duplicate (fep.in ())) != 0) { - ACE_THROW_RETURN (AVStreams::streamOpFailed (), 0); + throw AVStreams::streamOpFailed (); } // increment the flow count. this->flow_count_++; @@ -2673,7 +2673,7 @@ TAO_StreamEndPoint_A::connect_leaf (AVStreams::StreamEndPoint_B_ptr /* the_ep */ AVStreams::QoSRequestFailed, AVStreams::notSupported)) { - ACE_THROW_RETURN (AVStreams::notSupported (), 0); + throw AVStreams::notSupported (); } // Multicast not supported yet. @@ -3408,7 +3408,7 @@ TAO_MMDevice::add_fdev (CORBA::Object_ptr fdev_obj) if ( (this->fdev_map_.bind (fdev_name_key, fdev )) != 0) - ACE_THROW_RETURN (AVStreams::streamOpFailed (), 0); + throw AVStreams::streamOpFailed (); // increment the flow count. this->flow_count_++; this->flows_.length (this->flow_count_); diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.cpp b/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.cpp index b1c0dc9822a..c826c2bbebe 100644 --- a/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.cpp +++ b/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.cpp @@ -75,8 +75,7 @@ CC_Lock::try_lock (void) return 0; } else - ACE_THROW_RETURN (CORBA::INTERNAL (), - 0); + throw CORBA::INTERNAL (); } ACE_DEBUG ((LM_DEBUG, "lock_held_: %i, ", diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp index 8098635c66e..787ab1a4bdb 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPullSupplier.cpp @@ -161,7 +161,7 @@ TAO_CEC_ProxyPullSupplier::pull (void) CosEventComm::Disconnected)) { if (this->is_connected () == 0) - ACE_THROW_RETURN (CosEventComm::Disconnected (), 0); + throw CosEventComm::Disconnected (); ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, queue_lock_, 0); while (this->queue_.is_empty ()) @@ -171,7 +171,7 @@ TAO_CEC_ProxyPullSupplier::pull (void) CORBA::Any any; if (this->queue_.dequeue_head (any) != 0) { - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } return new CORBA::Any (any); } @@ -182,7 +182,7 @@ TAO_CEC_ProxyPullSupplier::try_pull (CORBA::Boolean_out has_event) { has_event = 0; if (this->is_connected () == 0) - ACE_THROW_RETURN (CosEventComm::Disconnected (), 0); + throw CosEventComm::Disconnected (); ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, queue_lock_, 0); CORBA::Any any; @@ -194,7 +194,7 @@ TAO_CEC_ProxyPullSupplier::try_pull (CORBA::Boolean_out has_event) if (this->queue_.dequeue_head (any) != 0) { - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } has_event = 1; return new CORBA::Any (any); diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedConsumerAdmin.cpp index 1b369165694..5a6615e297d 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedConsumerAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedConsumerAdmin.cpp @@ -69,7 +69,7 @@ TAO_CEC_TypedConsumerAdmin::obtain_typed_pull_supplier ( CosTypedEventChannelAdmin::InterfaceNotSupported )) { - ACE_THROW_RETURN (CosTypedEventChannelAdmin::InterfaceNotSupported (), 0); + throw CosTypedEventChannelAdmin::InterfaceNotSupported (); } CosEventChannelAdmin::ProxyPushSupplier_ptr @@ -87,7 +87,7 @@ TAO_CEC_TypedConsumerAdmin::obtain_typed_push_supplier ( if (result == -1) { - ACE_THROW_RETURN (CosTypedEventChannelAdmin::NoSuchImplementation (), 0); + throw CosTypedEventChannelAdmin::NoSuchImplementation (); } return this->typed_push_admin_.obtain (); @@ -97,14 +97,14 @@ CosEventChannelAdmin::ProxyPushSupplier_ptr TAO_CEC_TypedConsumerAdmin::obtain_push_supplier (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CosEventChannelAdmin::ProxyPullSupplier_ptr TAO_CEC_TypedConsumerAdmin::obtain_pull_supplier (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } PortableServer::POA_ptr diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedSupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedSupplierAdmin.cpp index d1e7bd34c1a..e978f362023 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedSupplierAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_TypedSupplierAdmin.cpp @@ -68,7 +68,7 @@ TAO_CEC_TypedSupplierAdmin::obtain_typed_push_consumer ( if (result == -1) { - ACE_THROW_RETURN (CosTypedEventChannelAdmin::InterfaceNotSupported (),0); + throw CosTypedEventChannelAdmin::InterfaceNotSupported (); } return this->typed_push_admin_.obtain (); @@ -84,21 +84,21 @@ TAO_CEC_TypedSupplierAdmin::obtain_typed_pull_consumer ( )) { - ACE_THROW_RETURN (CosTypedEventChannelAdmin::NoSuchImplementation (), 0); + throw CosTypedEventChannelAdmin::NoSuchImplementation (); } CosEventChannelAdmin::ProxyPushConsumer_ptr TAO_CEC_TypedSupplierAdmin::obtain_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CosEventChannelAdmin::ProxyPullConsumer_ptr TAO_CEC_TypedSupplierAdmin::obtain_pull_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp index aaa334439b5..122eb70ea15 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp @@ -31,9 +31,7 @@ TAO_EC_Null_ObserverStrategy::append_observer ( RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER)) { - ACE_THROW_RETURN ( - RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(), - 0); + throw RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(); } void @@ -93,9 +91,7 @@ TAO_EC_Basic_ObserverStrategy::append_observer ( RtecEventChannelAdmin::Observer::_duplicate (obs)); if (this->observers_.bind (entry.handle, entry) == -1) - ACE_THROW_RETURN ( - RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(), - 0); + throw RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(); } RtecEventChannelAdmin::ConsumerQOS c_qos; diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicyFactory.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicyFactory.cpp index 56c9b3f7a63..d3a1f29f20f 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicyFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicyFactory.cpp @@ -24,8 +24,7 @@ TAO_FT_ClientPolicyFactory::create_policy ( else if (type == FT::HEARTBEAT_POLICY) return TAO_FT_Heart_Beat_Policy::create (val); - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp index 758e9dc7019..9c46f6c1eae 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp @@ -33,8 +33,7 @@ TAO_FT_Request_Duration_Policy::create (const CORBA::Any& val) { TimeBase::TimeT value; if ((val >>= value) == 0) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); TAO_FT_Request_Duration_Policy *tmp = 0; ACE_NEW_THROW_EX (tmp, @@ -111,8 +110,7 @@ TAO_FT_Heart_Beat_Policy::create (const CORBA::Any& val) { FT::HeartbeatPolicyValue *value = 0; if ((val >>= value) == 0) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); TAO_FT_Heart_Beat_Policy *tmp = 0; ACE_NEW_THROW_EX (tmp, diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp index c83f99101e1..3cb9647f79d 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_IOGR_Property.cpp @@ -101,8 +101,7 @@ TAO_FT_IOGR_Property::get_primary ( this->get_primary_profile (ior); if (pfile == 0) - ACE_THROW_RETURN (TAO_IOP::NotFound (), - CORBA::Object::_nil ()); + throw TAO_IOP::NotFound (); // Search for the IOP::TAG_FT_PRIMARY in the tagged component of // the profile @@ -145,7 +144,7 @@ TAO_FT_IOGR_Property::get_primary ( // Clean up in case of errors. if (CORBA::is_nil (new_obj.in ())) { - ACE_THROW_RETURN (TAO_IOP::NotFound (), // ** Changed from Invalid_IOR () ** + throw TAO_IOP::NotFound ()** CORBA::Object::_nil ()); } @@ -183,8 +182,7 @@ TAO_FT_IOGR_Property::set_primary ( mprofile.get_profile (i)->tagged_components (); if (tag_comp.get_component (tagged_components) == 1) - ACE_THROW_RETURN (TAO_IOP::Duplicate (), - 0); + throw TAO_IOP::Duplicate (); } // Check whether ior1 exists in ior2 @@ -217,8 +215,7 @@ TAO_FT_IOGR_Property::set_primary ( // At the end of the loop check whether we have seen <ior1> in // <ior2> if (index == -1) - ACE_THROW_RETURN (TAO_IOP::NotFound (), - 0); + throw TAO_IOP::NotFound (); CORBA::Boolean val = 1; @@ -375,16 +372,14 @@ TAO_FT_IOGR_Property::get_tagged_component ( CORBA::Boolean byte_order; if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) - ACE_THROW_RETURN (CORBA::MARSHAL (), - 0); + throw CORBA::MARSHAL (); cdr.reset_byte_order (static_cast<int> (byte_order)); if ((cdr >> fgtc) == 1) return 1; else - ACE_THROW_RETURN (CORBA::MARSHAL (), - 0); + throw CORBA::MARSHAL (); } } diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_PolicyFactory.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_PolicyFactory.cpp index 95419a3a405..8d0fb2b0d53 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_PolicyFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_PolicyFactory.cpp @@ -27,8 +27,7 @@ TAO_FT_PolicyFactory::create_policy ( else if (type == FT::HEARTBEAT_ENABLED_POLICY) return TAO_FT_Heart_Beat_Enabled_Policy::create (val); - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Policy_i.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Policy_i.cpp index 053e1951e89..4ebfaaa3e0a 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Policy_i.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Policy_i.cpp @@ -30,8 +30,7 @@ TAO_FT_Request_Duration_Policy::create (const CORBA::Any& val) { TimeBase::TimeT value; if ((val >>= value) == 0) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); TAO_FT_Request_Duration_Policy *tmp; ACE_NEW_THROW_EX (tmp, @@ -110,8 +109,7 @@ TAO_FT_Heart_Beat_Policy::create (const CORBA::Any& val) { FT::HeartbeatPolicyValue *value; if ((val >>= value) == 0) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); TAO_FT_Heart_Beat_Policy *tmp; ACE_NEW_THROW_EX (tmp, @@ -197,8 +195,7 @@ TAO_FT_Heart_Beat_Enabled_Policy::create (const CORBA::Any& val) CORBA::Boolean value; if ((val >>= CORBA::Any::to_boolean (value)) == 0) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); TAO_FT_Heart_Beat_Enabled_Policy *tmp; ACE_NEW_THROW_EX (tmp, diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicyFactory.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicyFactory.cpp index 3e208e650c7..610d9a2f621 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicyFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicyFactory.cpp @@ -25,8 +25,7 @@ TAO_FT_ServerPolicyFactory::create_policy ( if (type == FT::HEARTBEAT_ENABLED_POLICY) return TAO_FT_Heart_Beat_Enabled_Policy::create (val); - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.cpp index a5279d8f3a5..9bcc2981aa0 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ServerPolicy_i.cpp @@ -27,8 +27,7 @@ TAO_FT_Heart_Beat_Enabled_Policy::create (const CORBA::Any& val) CORBA::Boolean value; if ((val >>= CORBA::Any::to_boolean (value)) == 0) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); TAO_FT_Heart_Beat_Enabled_Policy *tmp; ACE_NEW_THROW_EX (tmp, diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp index 2ca544403fe..02849e611d2 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_Service_Callbacks.cpp @@ -278,12 +278,11 @@ TAO_FT_Service_Callbacks::raise_comm_failure ( // As the right tags are not found close the connection and throw an // exception - ACE_THROW_RETURN (CORBA::COMM_FAILURE ( - CORBA::SystemException::_tao_minor_code ( - TAO_INVOCATION_RECV_REQUEST_MINOR_CODE, - errno), - CORBA::COMPLETED_MAYBE), - TAO::TAO_INVOKE_SYSTEM_EXCEPTION); + throw CORBA::COMM_FAILURE ( + CORBA::SystemException::_tao_minor_code ( + TAO_INVOCATION_RECV_REQUEST_MINOR_CODE, + errno), + CORBA::COMPLETED_MAYBE); } TAO::Invocation_Status diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.cpp index 67e075d97e0..391cc4d77e5 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.cpp @@ -203,7 +203,7 @@ TAO_FTEC_Event_Channel::append_observer (RtecEventChannelAdmin::Observer_ptr) { /// we have yet to implement the replication of observers /// throw an exception for the moment - ACE_THROW_RETURN(RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(), 0); + throw RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(); //return this->ec_impl_->append_observer (observer); } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp index ddf0f152674..1109d4a424b 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/ForwardCtrlServerInterceptor.cpp @@ -120,15 +120,14 @@ FT::ObjectGroupRefVersion get_ft_group_version(IOP::ServiceContext_var service_c CORBA::Boolean byte_order; if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, CORBA::COMPLETED_NO); cdr.reset_byte_order (static_cast<int> (byte_order)); FT::FTGroupVersionServiceContext fgvsc; if ((cdr >> fgvsc) == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, - CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, CORBA::COMPLETED_NO); return fgvsc.object_group_ref_version; } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FtEventServiceInterceptor.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FtEventServiceInterceptor.cpp index ccfd9d70465..4d05f000f95 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FtEventServiceInterceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FtEventServiceInterceptor.cpp @@ -126,13 +126,13 @@ get_transaction_depth_context( CORBA::Boolean byte_order; if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), -1); + throw CORBA::BAD_PARAM (); cdr.reset_byte_order (static_cast<int> (byte_order)); FTRT::TransactionDepth result; if ((cdr >> result) == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), -1); + throw CORBA::BAD_PARAM (); return result; } @@ -153,12 +153,12 @@ get_sequence_number_context( CORBA::Boolean byte_order; if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); cdr.reset_byte_order (static_cast<int> (byte_order)); if ((cdr >> result) == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); return result; } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp index 4247e0e285c..8f3e53a988f 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp @@ -73,7 +73,7 @@ get_object_id(CORBA::Any_var a) FtRtecEventChannelAdmin::ObjectId_var result; if ((a.in() >>= object_id) ==0) - ACE_THROW_RETURN(CORBA::NO_MEMORY(), result); + throw CORBA::NO_MEMORY(); ACE_NEW_THROW_EX(r, FtRtecEventChannelAdmin::ObjectId(*object_id), diff --git a/TAO/orbsvcs/orbsvcs/IFRService/AliasDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/AliasDef_i.cpp index 1dc15433676..0bc48826570 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/AliasDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/AliasDef_i.cpp @@ -67,7 +67,7 @@ TAO_AliasDef_i::type_i (void) this->repo_); if (0 == impl) { - ACE_THROW_RETURN ( CORBA::OBJECT_NOT_EXIST(), CORBA::TypeCode::_nil () ); + throw CORBA::OBJECT_NOT_EXIST(); } CORBA::TypeCode_var tc = impl->type_i (); diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp index 9d50d1214c8..b153fec28a6 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp @@ -2469,9 +2469,9 @@ TAO_Container_i::create_value_common ( } else { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 12, - CORBA::COMPLETED_NO), - path); + throw CORBA::BAD_PARAM ( + CORBA::OMGVMCID | 12, + CORBA::COMPLETED_NO); } } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ExtValueDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ExtValueDef_i.cpp index 51b596f3b33..4fd5b7b99da 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ExtValueDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ExtValueDef_i.cpp @@ -314,9 +314,9 @@ TAO_ExtValueDef_i::describe_ext_value_i ( if (fv_desc->operations[i].mode == CORBA::OP_ONEWAY && kind != CORBA::tk_void) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - 0); + throw CORBA::BAD_PARAM ( + CORBA::OMGVMCID | 31, + CORBA::COMPLETED_NO); } // Operation contexts. diff --git a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Loader.cpp b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Loader.cpp index 24a6876cd38..6bd5cb998dc 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Loader.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Loader.cpp @@ -80,9 +80,7 @@ TAO_IFR_Service_Loader::create_object (CORBA::ORB_ptr orb, orb); if (result != 0) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (0, - CORBA::COMPLETED_NO), - CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (0, CORBA::COMPLETED_NO); } return CORBA::Object::_nil (); diff --git a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp index ab1f5745bc8..c67e183cf86 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp @@ -1315,8 +1315,7 @@ TAO_IFR_Service_Utils::create_objref (CORBA::DefinitionKind def_kind, repo_id += "CORBA/ComponentIR/UsesDef:"; break; default: - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CORBA::Object::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); } repo_id += "1.0"; diff --git a/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp index 90e3018c72d..b651a989aa7 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp @@ -724,9 +724,7 @@ TAO_InterfaceDef_i::create_operation_i (const char *id, // Oneway operations cannot have a non-void return type. if (mode == CORBA::OP_ONEWAY && kind != CORBA::tk_void) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - CORBA::OperationDef::_nil ()); + throw CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, CORBA::COMPLETED_NO); } this->repo_->config ()->set_string_value (new_key, @@ -761,9 +759,7 @@ TAO_InterfaceDef_i::create_operation_i (const char *id, // Oneway operations cannot have INOUT or OUT parameters. if (mode == CORBA::OP_ONEWAY && params[i].mode != CORBA::PARAM_IN) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (31, - CORBA::COMPLETED_NO), - CORBA::OperationDef::_nil ()); + throw CORBA::BAD_PARAM (31, CORBA::COMPLETED_NO); } ACE_Configuration_Section_Key param_key; @@ -799,9 +795,7 @@ TAO_InterfaceDef_i::create_operation_i (const char *id, // Oneway operations cannot throw any user exceptions. if (mode == CORBA::OP_ONEWAY) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - CORBA::OperationDef::_nil ()); + throw CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, CORBA::COMPLETED_NO); } ACE_Configuration_Section_Key excepts_key; diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp index 734634884f7..2445d5936af 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp @@ -122,7 +122,7 @@ TAO_Repository_i::get_canonical_typecode_i (CORBA::TypeCode_ptr tc) default: return CORBA::TypeCode::_duplicate (tc); case CORBA::tk_fixed: - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::TypeCode::_nil ()); + throw CORBA::NO_IMPLEMENT (); case CORBA::tk_array: { CORBA::ULong length = tc->length (); @@ -477,7 +477,7 @@ TAO_Repository_i::create_fixed_i (CORBA::UShort /* digits */, ) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::FixedDef::_nil ()); + throw CORBA::NO_IMPLEMENT (); } int diff --git a/TAO/orbsvcs/orbsvcs/IFRService/StructDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/StructDef_i.cpp index 3050169c3fa..08257683595 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/StructDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/StructDef_i.cpp @@ -225,7 +225,7 @@ TAO_StructDef_i::members_i (void) this->repo_); if (0 == impl) { - ACE_THROW_RETURN ( CORBA::OBJECT_NOT_EXIST(), 0); + throw CORBA::OBJECT_NOT_EXIST(); } retval[k].type = impl->type_i (); diff --git a/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp index 2d1de15f315..a4a4e3c4785 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp @@ -139,7 +139,7 @@ TAO_UnionDef_i::discriminator_type_i (void) this->repo_); if (0 == impl) { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST(), CORBA::TypeCode::_nil () ); + throw CORBA::OBJECT_NOT_EXIST(); } return impl->type_i (); @@ -300,7 +300,7 @@ TAO_UnionDef_i::members_i (void) this->repo_); if (0 == impl) { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST(), 0 ); + throw CORBA::OBJECT_NOT_EXIST(); } retval[k].type = impl->type_i (); diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp index 98c762d0b23..d11a6bdee76 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ValueDef_i.cpp @@ -948,9 +948,9 @@ TAO_ValueDef_i::describe_value_i (void) if (fv_desc->operations[i].mode == CORBA::OP_ONEWAY && kind != CORBA::tk_void) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - 0); + throw CORBA::BAD_PARAM ( + CORBA::OMGVMCID | 31, + CORBA::COMPLETED_NO); } // Operation contexts. @@ -1519,9 +1519,7 @@ TAO_ValueDef_i::create_operation_i ( // Oneway operations cannot have a non-void return type. if (mode == CORBA::OP_ONEWAY && kind != CORBA::tk_void) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - CORBA::OperationDef::_nil ()); + throw CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, CORBA::COMPLETED_NO); } this->repo_->config ()->set_string_value (new_key, @@ -1556,9 +1554,9 @@ TAO_ValueDef_i::create_operation_i ( // Oneway operations cannot have INOUT or OUT parameters. if (mode == CORBA::OP_ONEWAY && params[i].mode != CORBA::PARAM_IN) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - CORBA::OperationDef::_nil ()); + throw CORBA::BAD_PARAM ( + CORBA::OMGVMCID | 31, + CORBA::COMPLETED_NO); } ACE_Configuration_Section_Key param_key; @@ -1594,9 +1592,7 @@ TAO_ValueDef_i::create_operation_i ( // Oneway operations cannot throw any user exceptions. if (mode == CORBA::OP_ONEWAY) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, - CORBA::COMPLETED_NO), - CORBA::OperationDef::_nil ()); + throw CORBA::BAD_PARAM (CORBA::OMGVMCID | 31, CORBA::COMPLETED_NO); } ACE_Configuration_Section_Key excepts_key; diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp index f4b283bc00c..b64c252a9b1 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Load_Average_Monitor.cpp @@ -120,12 +120,11 @@ TAO_LB_CPU_Load_Average_Monitor::loads (void) FILE * s = ::fopen ("/proc/loadavg", "r"); if (s == 0) - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - errno), - CORBA::COMPLETED_NO), - 0); + throw CORBA::NO_IMPLEMENT ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + errno), + CORBA::COMPLETED_NO); fscanf (s, "%f", &loadavg[0]); @@ -158,10 +157,10 @@ TAO_LB_CPU_Load_Average_Monitor::loads (void) if (num_processors > 0) load = loadavg[0] / num_processors; else - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); // Correct exception? + throw CORBA::TRANSIENT (); // Correct exception? } else - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); // Correct exception? + throw CORBA::TRANSIENT (); // Correct exception? #elif defined (__NetBSD__) || defined (__APPLE__) @@ -185,10 +184,10 @@ TAO_LB_CPU_Load_Average_Monitor::loads (void) if (num_processors > 0) load = loadavg[0] / num_processors; else - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); // Correct exception? + throw CORBA::TRANSIENT (); // Correct exception? } else - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); // Correct exception? + throw CORBA::TRANSIENT (); // Correct exception? #elif defined (__hpux) @@ -203,10 +202,10 @@ TAO_LB_CPU_Load_Average_Monitor::loads (void) if (num_processors > 0) load = psd.psd_avg_1_min / num_processors; else - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); // Correct exception? + throw CORBA::TRANSIENT (); // Correct exception? } else - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); // Correct exception? + throw CORBA::TRANSIENT (); // Correct exception? #endif @@ -233,7 +232,7 @@ TAO_LB_CPU_Load_Average_Monitor::loads (void) #else ACE_UNUSED_ARG (load); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); #endif /* linux || sun || __hpux || __NetBSD__ || __APPLE__ */ diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp index e1627c2b007..f6c9ab4202f 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Utilization_Monitor.cpp @@ -159,7 +159,7 @@ TAO_LB_CPU_Utilization_Monitor::loads (void) #else ACE_UNUSED_ARG (load); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); #endif /* linux || sun */ diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp index 1caafd25627..0e31588a9bb 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp @@ -157,7 +157,7 @@ TAO_LB_LeastLoaded::get_loads (CosLoadBalancing::LoadManager_ptr load_manager, CosLoadBalancing::LocationNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); CosLoadBalancing::LoadList_var loads = load_manager->get_loads (the_location); @@ -179,15 +179,13 @@ TAO_LB_LeastLoaded::next_member ( PortableGroup::MemberNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); PortableGroup::Locations_var locations = load_manager->locations_of_members (object_group); if (locations->length () == 0) - ACE_THROW_RETURN (CORBA::TRANSIENT (), - CORBA::Object::_nil ()); + throw CORBA::TRANSIENT (); // @@ RACE CONDITION. OBJECT GROUP MEMBERSHIP MAY CHANGE AFTER // RETRIEVING LOCATIONS! HOW DO WE HANDLE THAT? @@ -480,7 +478,7 @@ TAO_LB_LeastLoaded::get_location ( location = locations[location_index]; } else if (this->reject_threshold_ != 0) - ACE_THROW_RETURN (CORBA::TRANSIENT (), 0); + throw CORBA::TRANSIENT (); // ACE_DEBUG ((LM_DEBUG, "LOCATION ID == %s\n", location[0].id.in ())); } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadAverage.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadAverage.cpp index ca07c42fbc8..378f0b7ca41 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadAverage.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadAverage.cpp @@ -155,7 +155,7 @@ TAO_LB_LoadAverage::get_loads (CosLoadBalancing::LoadManager_ptr load_manager, CosLoadBalancing::LocationNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); CosLoadBalancing::LoadList_var loads = load_manager->get_loads (the_location); @@ -177,15 +177,13 @@ TAO_LB_LoadAverage::next_member ( PortableGroup::MemberNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); PortableGroup::Locations_var locations = load_manager->locations_of_members (object_group); if (locations->length () == 0) - ACE_THROW_RETURN (CORBA::TRANSIENT (), - CORBA::Object::_nil ()); + throw CORBA::TRANSIENT (); // @note The Random load balancing strategy is used since it is // very lightweight and stateless. diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp index eff1af2f793..ad9d4f6f92d 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp @@ -153,7 +153,7 @@ TAO_LB_LoadManager::get_loads (const PortableGroup::Location & the_location) if (this->load_map_.find (the_location, *tmp) == 0) return loads._retn (); else - ACE_THROW_RETURN (CosLoadBalancing::LocationNotFound (), 0); + throw CosLoadBalancing::LocationNotFound (); } void @@ -315,8 +315,7 @@ TAO_LB_LoadManager::get_load_alert ( } else { - ACE_THROW_RETURN (CosLoadBalancing::LoadAlertNotFound (), - CosLoadBalancing::LoadAlert::_nil ()); + throw CosLoadBalancing::LoadAlertNotFound (); } } @@ -419,8 +418,7 @@ TAO_LB_LoadManager::get_load_monitor ( CosLoadBalancing::LoadMonitor::_duplicate (entry->int_id_.in ()); } - ACE_THROW_RETURN (CosLoadBalancing::LocationNotFound (), - CosLoadBalancing::LoadMonitor::_nil ()); + throw CosLoadBalancing::LocationNotFound (); } void @@ -757,8 +755,7 @@ TAO_LB_LoadManager::next_member (const PortableServer::ObjectId & oid) this->object_group_manager_.object_group (oid); if (CORBA::is_nil (object_group.in ())) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CORBA::Object::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); PortableGroup::Properties_var properties = this->get_properties (object_group.in ()); @@ -780,8 +777,7 @@ TAO_LB_LoadManager::next_member (const PortableServer::ObjectId & oid) this->lm_ref_.in ()); } - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CORBA::Object::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); } void diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.cpp index ed62d396b8b..eb8e197efe6 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.cpp @@ -156,7 +156,7 @@ TAO_LB_LoadMinimum::get_loads (CosLoadBalancing::LoadManager_ptr load_manager, CosLoadBalancing::LocationNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); CosLoadBalancing::LoadList_var loads = load_manager->get_loads (the_location); @@ -178,15 +178,13 @@ TAO_LB_LoadMinimum::next_member ( PortableGroup::MemberNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); PortableGroup::Locations_var locations = load_manager->locations_of_members (object_group); if (locations->length () == 0) - ACE_THROW_RETURN (CORBA::TRANSIENT (), - CORBA::Object::_nil ()); + throw CORBA::TRANSIENT (); // @@ RACE CONDITION. OBJECT GROUP MEMBERSHIP MAY CHANGE AFTER // RETRIEVING LOCATIONS! HOW DO WE HANDLE THAT? diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.cpp index b213c38e90e..6210a2860db 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.cpp @@ -51,7 +51,7 @@ TAO_LB_MemberLocator::preinvoke ( ex._tao_print_exception ("LoadManager::next_member()"); } - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } void diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_ObjectReferenceFactory.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_ObjectReferenceFactory.cpp index d8a7e1a58dc..be53f7004fd 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_ObjectReferenceFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_ObjectReferenceFactory.cpp @@ -87,7 +87,7 @@ TAO_LB_ObjectReferenceFactory::make_object ( ACE_THROW_SPEC ((CORBA::SystemException)) { if (repository_id == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); CORBA::Object_var obj = this->old_orf_->make_object (repository_id, @@ -121,8 +121,7 @@ TAO_LB_ObjectReferenceFactory::make_object ( ex._tao_print_exception ( "TAO_LB_ObjectReferenceFactory::""make_object"); - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); } catch (const PortableGroup::MemberAlreadyPresent& ex) { @@ -130,8 +129,7 @@ TAO_LB_ObjectReferenceFactory::make_object ( ex._tao_print_exception ( "TAO_LB_ObjectReferenceFactory::""make_object"); - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), - CORBA::Object::_nil ()); + throw CORBA::BAD_INV_ORDER (); } catch (const PortableGroup::ObjectNotAdded& ex) @@ -140,8 +138,7 @@ TAO_LB_ObjectReferenceFactory::make_object ( ex._tao_print_exception ( "TAO_LB_ObjectReferenceFactory::""make_object"); - ACE_THROW_RETURN (CORBA::UNKNOWN (), - CORBA::Object::_nil ()); + throw CORBA::UNKNOWN (); } this->registered_members_[index] = 1; @@ -210,7 +207,7 @@ TAO_LB_ObjectReferenceFactory::find_object_group ( "find_object_group - " "Couldn't bind object group reference.\n")); - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } object_group = group._retn (); diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp index ac8b15a1dcd..febc140ce6d 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp @@ -67,7 +67,7 @@ TAO_LB_Random::get_loads (CosLoadBalancing::LoadManager_ptr load_manager, CosLoadBalancing::LocationNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); return load_manager->get_loads (the_location); } @@ -81,7 +81,7 @@ TAO_LB_Random::next_member ( PortableGroup::MemberNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); PortableGroup::Locations_var locations = load_manager->locations_of_members (object_group); @@ -116,8 +116,7 @@ TAO_LB_Random::_tao_next_member ( { const CORBA::ULong len = locations.length (); if (len == 0) - ACE_THROW_RETURN (CORBA::TRANSIENT (), - CORBA::Object::_nil ()); + throw CORBA::TRANSIENT (); // Pick a random location in the sequence using the higher order // bits (zero based indexing). diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RoundRobin.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RoundRobin.cpp index 09a69aaaf26..4266ba6052c 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RoundRobin.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RoundRobin.cpp @@ -67,7 +67,7 @@ TAO_LB_RoundRobin::get_loads (CosLoadBalancing::LoadManager_ptr load_manager, CosLoadBalancing::LocationNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); return load_manager->get_loads (the_location); } @@ -81,7 +81,7 @@ TAO_LB_RoundRobin::next_member ( PortableGroup::MemberNotFound)) { if (CORBA::is_nil (load_manager)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), CORBA::Object::_nil ()); + throw CORBA::BAD_PARAM (); const PortableGroup::ObjectGroupId id = load_manager->get_object_group_id (object_group); @@ -102,8 +102,7 @@ TAO_LB_RoundRobin::next_member ( const CORBA::ULong len = locations->length (); if (len == 0) - ACE_THROW_RETURN (CORBA::TRANSIENT (), - CORBA::Object::_nil ()); + throw CORBA::TRANSIENT (); TAO_LB_Location_Index_Map::ENTRY * entry; if (this->location_index_map_.find (id, entry) == 0) @@ -135,7 +134,7 @@ TAO_LB_RoundRobin::next_member ( const CORBA::ULong index = 0; if (this->location_index_map_.bind (id, index + 1) != 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), CORBA::Object::_nil ()); + throw CORBA::INTERNAL (); return load_manager->get_member_ref (object_group, locations[index]); diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp index b907563ad65..d23f8a68742 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Hash_Iterator_i.cpp @@ -47,7 +47,7 @@ TAO_Hash_Iterator_i::get (CORBA::ULong position, if (position < current_position_) { - ACE_THROW_RETURN (DsLogAdmin::InvalidParam (), 0); + throw DsLogAdmin::InvalidParam (); } if (how_many == 0) diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp index 1d0e8609fda..c2b89d1aaaa 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp @@ -321,8 +321,7 @@ TAO_Hash_LogRecordStore::get_record_attribute (DsLogAdmin::RecordId id) if (retval == -1) { - ACE_THROW_RETURN (DsLogAdmin::InvalidRecordId (), - 0); + throw DsLogAdmin::InvalidRecordId (); } DsLogAdmin::NVList* nvlist = 0; diff --git a/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp b/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp index 388450253a2..970f414c29e 100644 --- a/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/LogActivator.cpp @@ -30,7 +30,7 @@ TAO_LogActivator::incarnate (const PortableServer::ObjectId& oid, DsLogAdmin::LogId id = ACE_OS::strtoul(poa_id.in (), 0, 0); if (!logmgr_i_.exists(id)) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); return logmgr_i_.create_log_servant (id); } diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp index 102221bc7da..512714b612e 100644 --- a/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/NotifyLogFactory_i.cpp @@ -205,7 +205,7 @@ TAO_NotifyLogFactory_i::MyChannel (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT(), 0); + throw CORBA::NO_IMPLEMENT(); } CosNotifyChannelAdmin::InterFilterGroupOperator diff --git a/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp b/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp index 22c4f8e7d8f..0bb2cec3a2f 100644 --- a/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/NotifyLog_i.cpp @@ -161,7 +161,7 @@ TAO_NotifyLog_i::get_filter (void) )) { //TODO: need to add impl - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -182,7 +182,7 @@ TAO_NotifyLog_i::MyFactory (void) )) { //TODO: need to add impl - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CosNotifyChannelAdmin::ConsumerAdmin_ptr @@ -296,7 +296,7 @@ TAO_NotifyLog_i::get_qos (void) )) { //need to add merging of QoS from Log_i and EventChannel_i - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/orbsvcs/orbsvcs/Metrics/Metrics_FrameManager_T.inl b/TAO/orbsvcs/orbsvcs/Metrics/Metrics_FrameManager_T.inl index a14671b359e..a3ec949edb9 100644 --- a/TAO/orbsvcs/orbsvcs/Metrics/Metrics_FrameManager_T.inl +++ b/TAO/orbsvcs/orbsvcs/Metrics/Metrics_FrameManager_T.inl @@ -70,7 +70,7 @@ register_period (RtecScheduler::Period_t p, ACE_Write_Guard<ACE_LOCK> mon (this->lock_); if (mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } int result = 0; @@ -89,7 +89,7 @@ register_period (RtecScheduler::Period_t p, delete data; // We failed to bind: throw an exception. - ACE_THROW_RETURN (Metrics::INTERNAL (), -1); + throw Metrics::INTERNAL (); } } @@ -136,7 +136,7 @@ update_all_frames_with_time (Metrics::Time mt, ORBSVCS_Time::TimeT_to_Time_Value(tv, mt); if (this->update_all_frames (tv) < 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } return 0; @@ -156,7 +156,7 @@ update_all_frames (CORBA::Environment &ACE_TRY_ENV) ACE_Write_Guard<ACE_LOCK> mon (this->lock_); if (mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } METRICS_FRAME_DATA_MAP_ITERATOR iter (frame_data_map_); @@ -241,7 +241,7 @@ update_frame_with_time (RtecScheduler::Period_t p, Metrics::Time mt, { case -1: ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); case -2: ACE_THROW_RETURN (Metrics::INTERNAL (), -1); - default: return 0; + default: return 0; } } @@ -269,7 +269,7 @@ update_frame (RtecScheduler::Period_t p, CORBA::Environment &ACE_TRY_ENV) ACE_Read_Guard<ACE_LOCK> mon (this->lock_); if (mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } if (frame_data_map_.find (p, data) == 0 && data != 0) @@ -281,7 +281,7 @@ update_frame (RtecScheduler::Period_t p, CORBA::Environment &ACE_TRY_ENV) ACE_Write_Guard<ACE_LOCK> data_mon (data->lock_); if (data_mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } // Grab the time stamp as late as possible, i.e., after all locks @@ -293,7 +293,7 @@ update_frame (RtecScheduler::Period_t p, CORBA::Environment &ACE_TRY_ENV) return update_data (*data, tv); } - ACE_THROW_RETURN (Metrics::INTERNAL (), -1); + throw Metrics::INTERNAL (); } @@ -336,7 +336,7 @@ reset_all_frames_with_time (Metrics::Time mt, ORBSVCS_Time::TimeT_to_Time_Value(tv, mt); if (this->reset_all_frames (tv) < 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } return 0; @@ -355,7 +355,7 @@ reset_all_frames (CORBA::Environment &ACE_TRY_ENV) ACE_Write_Guard<ACE_LOCK> mon (this->lock_); if (mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } METRICS_FRAME_DATA_MAP_ITERATOR iter (frame_data_map_); @@ -441,7 +441,7 @@ reset_frame_with_time (RtecScheduler::Period_t p, Metrics::Time mt, { case -1: ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); case -2: ACE_THROW_RETURN (Metrics::INTERNAL (), -1); - default: return 0; + default: return 0; } } @@ -469,7 +469,7 @@ reset_frame (RtecScheduler::Period_t p, CORBA::Environment &ACE_TRY_ENV) ACE_Read_Guard<ACE_LOCK> mon (this->lock_); if (mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } if (frame_data_map_.find (p, data) == 0 && data != 0) @@ -481,7 +481,7 @@ reset_frame (RtecScheduler::Period_t p, CORBA::Environment &ACE_TRY_ENV) ACE_Write_Guard<ACE_LOCK> data_mon (data->lock_); if (data_mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } // Grab the time stamp as late as possible, i.e., after all locks @@ -492,13 +492,13 @@ reset_frame (RtecScheduler::Period_t p, CORBA::Environment &ACE_TRY_ENV) if (data == 0) { - ACE_THROW_RETURN (Metrics::INTERNAL (), -1); + throw Metrics::INTERNAL (); } return reset_data (*data, tv); } - ACE_THROW_RETURN (Metrics::INTERNAL (), -1); + throw Metrics::INTERNAL (); } @@ -568,7 +568,7 @@ get_start_time (RtecScheduler::Period_t p, Metrics::Time &start, case -1: ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); case -2: ACE_THROW_RETURN (Metrics::INTERNAL (), -1); default: ORBSVCS_Time::Time_Value_to_TimeT (start, tv); - return 0; + return 0; } } @@ -640,7 +640,7 @@ get_end_time (RtecScheduler::Period_t p, Metrics::Time &end, case -1: ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); case -2: ACE_THROW_RETURN (Metrics::INTERNAL (), -1); default: ORBSVCS_Time::Time_Value_to_TimeT (end, tv); - return 0; + return 0; } } @@ -669,7 +669,7 @@ get_frame_id (RtecScheduler::Period_t p, ACE_Read_Guard<ACE_LOCK> mon (this->lock_); if (mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } if (frame_data_map_.find (p, data) == 0 && data != 0) @@ -680,14 +680,14 @@ get_frame_id (RtecScheduler::Period_t p, ACE_Read_Guard<ACE_LOCK> data_mon (data->lock_); if (data_mon.locked () == 0) { - ACE_THROW_RETURN (Metrics::SYNCHRONIZATION (), -1); + throw Metrics::SYNCHRONIZATION (); } id = data->frame_id_; return 0; } - ACE_THROW_RETURN (Metrics::INTERNAL (), -1); + throw Metrics::INTERNAL (); } diff --git a/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp b/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp index deacbd41cf5..09b5527d02b 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp @@ -48,7 +48,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_one ( CosNaming::Binding_out b) ACE_THROW_SPEC ((CORBA::SystemException)) { - CosNaming::Binding *binding; + CosNaming::Binding *binding = 0; // Allocate a binding to be returned (even if there no more // bindings, we need to allocate an out parameter.) @@ -65,7 +65,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_one ( // Check to make sure this object is still valid. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); // If the context we are iterating over has been destroyed, // self-destruct. @@ -73,7 +73,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_one ( { destroy (); - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } // If there are no more bindings. @@ -90,7 +90,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_one ( hash_iter_->next (hash_entry); if (populate_binding (hash_entry, *binding) == 0) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + throw CORBA::NO_MEMORY (); hash_iter_->advance (); return 1; @@ -116,7 +116,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_n ( // Check to make sure this object is still valid. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); // If the context we are iterating over has been destroyed, // self-destruct. @@ -124,12 +124,12 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_n ( { destroy (); - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } // Check for illegal parameter values. if (how_many == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); // If there are no more bindings... if (hash_iter_->done ()) @@ -148,7 +148,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_n ( hash_iter_->next (hash_entry); if (populate_binding (hash_entry, bl[i]) == 0) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + throw CORBA::NO_MEMORY (); if (hash_iter_->advance () == 0) { diff --git a/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp index 9e558e7b8fd..f30b6942a8e 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Hash_Naming_Context.cpp @@ -98,10 +98,9 @@ TAO_Hash_Naming_Context::get_context (const CosNaming::Name &name) rest.length (2); rest[0] = name[name_len - 2]; rest[1] = name[name_len - 1]; - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::not_context, - rest), - CosNaming::NamingContext::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::not_context, + rest); } // Finally, if everything went smoothly, just return the resolved // context. @@ -109,8 +108,7 @@ TAO_Hash_Naming_Context::get_context (const CosNaming::Name &name) } void -TAO_Hash_Naming_Context::bind (const CosNaming::Name& n, - CORBA::Object_ptr obj) +TAO_Hash_Naming_Context::bind (const CosNaming::Name& n, CORBA::Object_ptr obj) { ACE_GUARD_THROW_EX (TAO_SYNCH_RECURSIVE_MUTEX, ace_mon, this->lock_, @@ -122,7 +120,7 @@ TAO_Hash_Naming_Context::bind (const CosNaming::Name& n, throw CORBA::OBJECT_NOT_EXIST (); // Get the length of the name. - CORBA::ULong name_len = n.length (); + CORBA::ULong const name_len = n.length (); // Check for invalid name. if (name_len == 0) @@ -133,8 +131,7 @@ TAO_Hash_Naming_Context::bind (const CosNaming::Name& n, // target context. if (name_len > 1) { - CosNaming::NamingContext_var context = - this->get_context (n); + CosNaming::NamingContext_var context = this->get_context (n); CosNaming::Name simple_name; simple_name.length (1); @@ -146,9 +143,7 @@ TAO_Hash_Naming_Context::bind (const CosNaming::Name& n, catch (const CORBA::TIMEOUT&) { throw CosNaming::NamingContext::CannotProceed( - context.in ( - ), - simple_name); + context.in (), simple_name); } } // If we received a simple name, we need to bind it in this context. @@ -182,7 +177,7 @@ TAO_Hash_Naming_Context::rebind (const CosNaming::Name& n, throw CORBA::OBJECT_NOT_EXIST (); // Get the length of the name. - CORBA::ULong name_len = n.length (); + CORBA::ULong const name_len = n.length (); // Check for invalid name. if (name_len == 0) @@ -193,8 +188,7 @@ TAO_Hash_Naming_Context::rebind (const CosNaming::Name& n, // on target context. if (name_len > 1) { - CosNaming::NamingContext_var context = - get_context (n); + CosNaming::NamingContext_var context = get_context (n); CosNaming::Name simple_name; simple_name.length (1); @@ -206,9 +200,7 @@ TAO_Hash_Naming_Context::rebind (const CosNaming::Name& n, catch (const CORBA::TIMEOUT&) { throw CosNaming::NamingContext::CannotProceed( - context.in ( - ), - simple_name); + context.in (), simple_name); } } else @@ -225,8 +217,7 @@ TAO_Hash_Naming_Context::rebind (const CosNaming::Name& n, else if (result == -2) throw CosNaming::NamingContext::NotFound( - CosNaming::NamingContext::not_object, - n); + CosNaming::NamingContext::not_object, n); } } @@ -248,7 +239,7 @@ TAO_Hash_Naming_Context::bind_context (const CosNaming::Name &n, throw CORBA::BAD_PARAM (); // Get the length of the name. - CORBA::ULong name_len = n.length (); + CORBA::ULong const name_len = n.length (); // Check for invalid name. if (name_len == 0) @@ -259,8 +250,7 @@ TAO_Hash_Naming_Context::bind_context (const CosNaming::Name &n, // target context. if (name_len > 1) { - CosNaming::NamingContext_var context = - get_context (n); + CosNaming::NamingContext_var context = get_context (n); CosNaming::Name simple_name; simple_name.length (1); @@ -272,9 +262,7 @@ TAO_Hash_Naming_Context::bind_context (const CosNaming::Name &n, catch (const CORBA::TIMEOUT&) { throw CosNaming::NamingContext::CannotProceed( - context.in ( - ), - simple_name); + context.in (), simple_name); } } // If we received a simple name, we need to bind it in this context. @@ -308,7 +296,7 @@ TAO_Hash_Naming_Context::rebind_context (const CosNaming::Name &n, throw CORBA::OBJECT_NOT_EXIST (); // Get the length of the name. - CORBA::ULong name_len = n.length (); + CORBA::ULong const name_len = n.length (); // Check for invalid name. if (name_len == 0) @@ -332,9 +320,7 @@ TAO_Hash_Naming_Context::rebind_context (const CosNaming::Name &n, catch (const CORBA::TIMEOUT&) { throw CosNaming::NamingContext::CannotProceed( - context.in ( - ), - simple_name); + context.in (), simple_name); } } else @@ -365,16 +351,14 @@ TAO_Hash_Naming_Context::resolve (const CosNaming::Name& n) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CORBA::Object::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // Get the length of the name. - CORBA::ULong name_len = n.length (); + CORBA::ULong const name_len = n.length (); // Check for invalid name. if (name_len == 0) - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::InvalidName(); // Resolve the first component of the name. @@ -388,10 +372,9 @@ TAO_Hash_Naming_Context::resolve (const CosNaming::Name& n) n[0].kind, result.out (), type) == -1) - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::missing_node, - n), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::missing_node, + n); // If the name we have to resolve is a compound name, we need to // resolve it recursively. @@ -407,17 +390,15 @@ TAO_Hash_Naming_Context::resolve (const CosNaming::Name& n) } else // The first name component wasn't bound to a NamingContext. - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::not_context, - n), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::not_context, + n); // If narrow failed... if (CORBA::is_nil (context.in ())) - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::not_context, - n), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::not_context, + n); else { // Successfully resolved the first name component, need to @@ -443,9 +424,7 @@ TAO_Hash_Naming_Context::resolve (const CosNaming::Name& n) catch (const CORBA::TIMEOUT&) { throw CosNaming::NamingContext::CannotProceed( - context.in ( - ), - rest_of_name); + context.in (), rest_of_name); } } } @@ -467,7 +446,7 @@ TAO_Hash_Naming_Context::unbind (const CosNaming::Name& n) throw CORBA::OBJECT_NOT_EXIST (); // Get the length of the name. - CORBA::ULong name_len = n.length (); + CORBA::ULong const name_len = n.length (); // Check for invalid name. if (name_len == 0) @@ -491,9 +470,7 @@ TAO_Hash_Naming_Context::unbind (const CosNaming::Name& n) catch (const CORBA::TIMEOUT&) { throw CosNaming::NamingContext::CannotProceed( - context.in ( - ), - simple_name); + context.in (), simple_name); } } // If we received a simple name, we need to unbind it in this @@ -502,8 +479,7 @@ TAO_Hash_Naming_Context::unbind (const CosNaming::Name& n) if (this->context_->unbind (n[0].id, n[0].kind) == -1) throw CosNaming::NamingContext::NotFound( - CosNaming::NamingContext::missing_node, - n); + CosNaming::NamingContext::missing_node, n); } CosNaming::NamingContext_ptr @@ -517,16 +493,14 @@ TAO_Hash_Naming_Context::bind_new_context (const CosNaming::Name& n) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CosNaming::NamingContext::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // Get the length of the name. CORBA::ULong name_len = n.length (); // Check for invalid name. if (name_len == 0) - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), - CosNaming::NamingContext::_nil ()); + throw CosNaming::NamingContext::InvalidName(); // If we received compound name, resolve it to get the context in // which the binding should take place, then perform the operation on @@ -554,8 +528,7 @@ TAO_Hash_Naming_Context::bind_new_context (const CosNaming::Name& n) // Bind the new context to the name. try { - bind_context (n, - result.in ()); + bind_context (n, result.in ()); } catch (const CORBA::Exception&) { @@ -611,7 +584,6 @@ TAO_Hash_Naming_Context::destroy (void) PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId (poa_id_.fast_rep ()); - poa->deactivate_object (id.in ()); } } diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.cpp index 1ebd2d7e6ef..ee5a710de0d 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.cpp @@ -24,8 +24,7 @@ TAO_Naming_Client::get_context (void) const } int -TAO_Naming_Client::init (CORBA::ORB_ptr orb, - ACE_Time_Value *timeout) +TAO_Naming_Client::init (CORBA::ORB_ptr orb, ACE_Time_Value *timeout) { try { diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.h b/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.h index 56b48d7f37d..139226d0747 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Client.h @@ -47,12 +47,11 @@ public: TAO_Naming_Client (void); /** - * Look for a Naming Service for a period of <timeout> using - * <resolve_initial_references>. Return 0 if Naming Service is + * Look for a Naming Service for a period of @a timeout using + * @c resolve_initial_references. Return 0 if Naming Service is * successfully located, and -1 on failure. */ - int init (CORBA::ORB_ptr orb, - ACE_Time_Value *timeout = 0); + int init (CORBA::ORB_ptr orb, ACE_Time_Value *timeout = 0); /// Destructor. ~TAO_Naming_Client (void); diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp index 001c4d51bc5..b160d18eaa1 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp @@ -37,8 +37,7 @@ TAO_Naming_Context::_default_POA (/*env*/) } void -TAO_Naming_Context::bind (const CosNaming::Name &n, - CORBA::Object_ptr obj) +TAO_Naming_Context::bind (const CosNaming::Name &n, CORBA::Object_ptr obj) ACE_THROW_SPEC ((CORBA::SystemException, CosNaming::NamingContext::NotFound, CosNaming::NamingContext::CannotProceed, @@ -49,8 +48,7 @@ TAO_Naming_Context::bind (const CosNaming::Name &n, } void -TAO_Naming_Context::rebind (const CosNaming::Name &n, - CORBA::Object_ptr obj) +TAO_Naming_Context::rebind (const CosNaming::Name &n, CORBA::Object_ptr obj) ACE_THROW_SPEC ((CORBA::SystemException, CosNaming::NamingContext::NotFound, CosNaming::NamingContext::CannotProceed, @@ -177,8 +175,7 @@ TAO_Naming_Context::to_string (const CosNaming::Name &n) // Check for invalid name. if (n.length () == 0) - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), - 0); + throw CosNaming::NamingContext::InvalidName(); // Length of the return string CORBA::ULong len = 0; @@ -205,7 +202,7 @@ TAO_Naming_Context::to_string (const CosNaming::Name &n) // if (str_name == 0) { - ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + throw CORBA::NO_MEMORY (); } char *k = str_name; @@ -323,8 +320,7 @@ TAO_Naming_Context::to_name (const char *sn) // Check for InvalidName i.e. Invalid stringified name // if (len == 0) - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), - 0); + throw CosNaming::NamingContext::InvalidName(); // Assign the length of the return unstringified name. // @@ -338,7 +334,7 @@ TAO_Naming_Context::to_name (const char *sn) { if (count > ncomp) { - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), 0); + throw CosNaming::NamingContext::InvalidName(); } char *id = CORBA::string_alloc (len); @@ -407,8 +403,7 @@ TAO_Naming_Context::to_url_validate_and_compute_size ( // Check for invalid address if (addr_len == 0) - ACE_THROW_RETURN (CosNaming::NamingContextExt::InvalidAddress (), - 0); + throw CosNaming::NamingContextExt::InvalidAddress (); // Make a pass through the in string name to count the number of // characters and if the character @@ -424,7 +419,7 @@ TAO_Naming_Context::to_url_validate_and_compute_size ( } if (sn_len == 0) - ACE_THROW_RETURN (CosNaming::NamingContextExt::InvalidName (), 0); + throw CosNaming::NamingContextExt::InvalidName (); return addr_len + sn_len; } diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.h b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.h index 5d7c3919fb6..f194f75ea10 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.h @@ -119,9 +119,7 @@ public: /// Initialize the Naming Service with the command line arguments and /// the ORB. - int init_with_orb (int argc, - ACE_TCHAR *argv [], - CORBA::ORB_ptr orb); + int init_with_orb (int argc, ACE_TCHAR *argv [], CORBA::ORB_ptr orb); /// Destroy the child POA created in <init_with_orb> int fini (void); diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp index 1daca1ca553..e7235ed53ff 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp @@ -338,7 +338,7 @@ TAO_Persistent_Naming_Context::make_new_context (PortableServer::POA_ptr poa, ACE_Auto_Basic_Ptr<TAO_Persistent_Naming_Context> temp (context_impl); if (context_impl->init (context_size) == -1) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), result._retn ()); + throw CORBA::NO_MEMORY (); // Insure appropriate cleanup in case of exception conditions ahead. context_impl->set_cleanup_level (1); @@ -347,7 +347,7 @@ TAO_Persistent_Naming_Context::make_new_context (PortableServer::POA_ptr poa, if (ind->bind (context_impl->poa_id_.c_str (), context_impl->counter_, context_impl->persistent_context_->map ()) == -1) - ACE_THROW_RETURN (CORBA::INTERNAL (), result._retn ()); + throw CORBA::INTERNAL (); // Insure appropriate cleanup in case of exception conditions ahead. context_impl->set_cleanup_level (2); @@ -391,8 +391,7 @@ TAO_Persistent_Naming_Context::new_context (void) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CosNaming::NamingContext::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // Generate a POA id for the new context. char poa_id[BUFSIZ]; diff --git a/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context.cpp index 94a9fa71c74..5f267d3269c 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context.cpp @@ -136,8 +136,7 @@ TAO_Storable_ExtId::kind (void) } int -TAO_Storable_Bindings_Map::unbind (const char *id, - const char *kind) +TAO_Storable_Bindings_Map::unbind (const char *id, const char *kind) { ACE_TRACE("unbind"); TAO_Storable_ExtId name (id, kind); @@ -371,7 +370,7 @@ TAO_Storable_Naming_Context::load_map(File_Open_Lock_and_Check *flck) if (!flck->peer ().good ()) { flck->peer ().clear (); - ACE_THROW_RETURN (CORBA::INTERNAL (), -1); + throw CORBA::INTERNAL (); } // reset the destroyed flag @@ -384,7 +383,7 @@ TAO_Storable_Naming_Context::load_map(File_Open_Lock_and_Check *flck) if (!flck->peer ().good ()) { flck->peer ().clear (); - ACE_THROW_RETURN (CORBA::INTERNAL (), -1); + throw CORBA::INTERNAL (); } if (TAO_NS_Persistence_Record::LOCAL_NCONTEXT == record.type ()) @@ -540,8 +539,7 @@ File_Open_Lock_and_Check::~File_Open_Lock_and_Check(void) } TAO_Storable_Base & -TAO_Storable_Naming_Context:: -File_Open_Lock_and_Check::peer(void) +TAO_Storable_Naming_Context::File_Open_Lock_and_Check::peer(void) { ACE_TRACE("peer"); return *fl_; @@ -653,13 +651,11 @@ TAO_Storable_Naming_Context::make_new_context ( // this situation. try { - poa->activate_object_with_id (id.in (), - context); + poa->activate_object_with_id (id.in (), context); } catch (const PortableServer::POA::ObjectAlreadyActive&) { - ACE_THROW_RETURN (CosNaming::NamingContext::AlreadyBound(), - CosNaming::NamingContext::_nil ()); + throw CosNaming::NamingContext::AlreadyBound(); } @@ -687,8 +683,7 @@ TAO_Storable_Naming_Context::new_context (void) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CosNaming::NamingContext::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); } TAO_NS_Persistence_Global global; @@ -700,19 +695,17 @@ TAO_Storable_Naming_Context::new_context (void) if (gfl_->open() != 0) { delete gfl_.release(); - ACE_THROW_RETURN(CORBA::PERSIST_STORE(), - CosNaming::NamingContext::_nil ()); + throw CORBA::PERSIST_STORE(); } if (gfl_ -> flock(0, 0, 0) != 0) - ACE_THROW_RETURN (CORBA::INTERNAL(), - CosNaming::NamingContext::_nil ()); + throw CORBA::INTERNAL(); // get the counter from disk *gfl_.get() >> global; if (!gfl_.get ()->good () && gfl_.get ()->rdstate () != TAO_Storable_Base::eofbit) { gfl_.get ()->clear (); - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } gcounter_ = global.counter(); // use it to generate a new name @@ -729,8 +722,7 @@ TAO_Storable_Naming_Context::new_context (void) { // and release our lock if (gfl_ -> flock(0, 0, 0) != 0) - ACE_THROW_RETURN(CORBA::INTERNAL(), - CosNaming::NamingContext::_nil ()); + throw CORBA::INTERNAL(); gfl_->close(); } @@ -954,8 +946,7 @@ TAO_Storable_Naming_Context::resolve (const CosNaming::Name& n) // Check for invalid name. if (name_len == 0) - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::InvalidName(); // we didn't need a lock to check the input arg, but now we do ACE_GUARD_THROW_EX (ACE_SYNCH_RECURSIVE_MUTEX, ace_mon, this->lock_, @@ -967,8 +958,7 @@ TAO_Storable_Naming_Context::resolve (const CosNaming::Name& n) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CORBA::Object::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // Resolve the first component of the name. flck.release(); @@ -982,9 +972,9 @@ TAO_Storable_Naming_Context::resolve (const CosNaming::Name& n) n[0].kind, obj, type) == -1) - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::missing_node, n), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::missing_node, + n); // Store the value in var to avoid memory leaks. CORBA::Object_var result = obj; @@ -1003,16 +993,15 @@ TAO_Storable_Naming_Context::resolve (const CosNaming::Name& n) } else // The first name component wasn't bound to a NamingContext. - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::not_context, - n), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::not_context, + n); // If narrow failed... if (CORBA::is_nil (context.in ())) - ACE_THROW_RETURN (CosNaming::NamingContext::NotFound - (CosNaming::NamingContext::not_context, n), - CORBA::Object::_nil ()); + throw CosNaming::NamingContext::NotFound( + CosNaming::NamingContext::not_context, + n); else { // Successfully resolved the first name component, need to @@ -1099,8 +1088,7 @@ TAO_Storable_Naming_Context::bind_new_context (const CosNaming::Name& n) // Check for invalid name. if (name_len == 0) - ACE_THROW_RETURN (CosNaming::NamingContext::InvalidName(), - CosNaming::NamingContext::_nil ()); + throw CosNaming::NamingContext::InvalidName(); ACE_GUARD_THROW_EX (ACE_SYNCH_RECURSIVE_MUTEX, ace_mon, @@ -1110,8 +1098,7 @@ TAO_Storable_Naming_Context::bind_new_context (const CosNaming::Name& n) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CosNaming::NamingContext::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // Open the backing file File_Open_Lock_and_Check flck(this, name_len > 1 ? "r" : "rw"); @@ -1119,8 +1106,7 @@ TAO_Storable_Naming_Context::bind_new_context (const CosNaming::Name& n) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CosNaming::NamingContext::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // If we received compound name, resolve it to get the context in // which the binding should take place, then perform the operation on @@ -1470,8 +1456,7 @@ CosNaming::NamingContext_ptr TAO_Storable_Naming_Context::recreate_all( if (gfl_->open() != 0) { delete gfl_.release(); - ACE_THROW_RETURN(CORBA::PERSIST_STORE(), - CosNaming::NamingContext::_nil ()); + throw CORBA::PERSIST_STORE(); } // get the counter from disk @@ -1481,7 +1466,7 @@ CosNaming::NamingContext_ptr TAO_Storable_Naming_Context::recreate_all( gfl_.get ()->rdstate () != TAO_Storable_Base::eofbit) { gfl_.get ()->clear (); - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } gcounter_ = global.counter(); if(redundant_) gfl_->close(); diff --git a/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_Activator.cpp b/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_Activator.cpp index 53afd9176ab..731f1a8cdd5 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_Activator.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Storable_Naming_Context_Activator.cpp @@ -64,8 +64,7 @@ TAO_Storable_Naming_Context_Activator::incarnate ( file_name += ACE_TEXT_CHAR_TO_TCHAR(poa_id.in()); TAO_Storable_Base * fl = factory_->create_stream(ACE_TEXT_ALWAYS_CHAR(file_name.c_str()), ACE_TEXT("rw")); if (!fl->exists()) { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); + throw CORBA::OBJECT_NOT_EXIST (); } // Store the stub we will return here. diff --git a/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp index e4433dec433..cdbd99ffb0f 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp @@ -22,8 +22,7 @@ ACE_RCSID(Naming, Transient_Naming_Context, "$Id$") TAO_BEGIN_VERSIONED_NAMESPACE_DECL int -TAO_Transient_Bindings_Map::unbind (const char *id, - const char *kind) +TAO_Transient_Bindings_Map::unbind (const char *id, const char *kind) { TAO_ExtId name (id, kind); return this->map_.unbind (name); @@ -198,8 +197,7 @@ TAO_Transient_Naming_Context::new_context (void) // Check to make sure this object didn't have <destroy> method // invoked on it. if (this->destroyed_) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - CosNaming::NamingContext::_nil ()); + throw CORBA::OBJECT_NOT_EXIST (); // Generate a POA id for the new context. char poa_id[BUFSIZ]; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp index 60d125850f9..b1313c1e5d0 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp @@ -370,8 +370,7 @@ TAO_Notify_Builder::build_proxy(TAO_Notify_SupplierAdmin* sa break; default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CosNotifyChannelAdmin::ProxyConsumer::_nil ()); + throw CORBA::BAD_PARAM (); } } @@ -405,8 +404,7 @@ TAO_Notify_Builder::build_proxy(TAO_Notify_ConsumerAdmin* ca break; default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - CosNotifyChannelAdmin::ProxySupplier::_nil ()); + throw CORBA::BAD_PARAM (); } } @@ -439,8 +437,7 @@ TAO_Notify_Builder::build_proxy(TAO_Notify_SupplierAdmin* sa break; default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - 0); + throw CORBA::BAD_PARAM (); } } @@ -473,8 +470,7 @@ TAO_Notify_Builder::build_proxy(TAO_Notify_ConsumerAdmin* ca break; default: - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - 0); + throw CORBA::BAD_PARAM (); } } diff --git a/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp index 495aa338b2a..31a2b3b4845 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/ConsumerAdmin.cpp @@ -364,7 +364,7 @@ TAO_Notify_ConsumerAdmin::priority_filter (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyFilter::MappingFilter::_nil ()); + throw CORBA::NO_IMPLEMENT (); } void @@ -384,7 +384,7 @@ TAO_Notify_ConsumerAdmin::lifetime_filter (void) )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyFilter::MappingFilter::_nil ()); + throw CORBA::NO_IMPLEMENT (); } void @@ -402,7 +402,7 @@ TAO_Notify_ConsumerAdmin::pull_suppliers (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CosNotifyChannelAdmin::ProxySupplier_ptr @@ -414,7 +414,7 @@ TAO_Notify_ConsumerAdmin::obtain_notification_pull_supplier (CosNotifyChannelAdm )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyChannelAdmin::ProxySupplier::_nil ()); + throw CORBA::NO_IMPLEMENT (); } void @@ -435,7 +435,7 @@ TAO_Notify_ConsumerAdmin::obtain_pull_supplier (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosEventChannelAdmin::ProxyPullSupplier::_nil ()); + throw CORBA::NO_IMPLEMENT (); } TAO_Notify_ProxySupplier * diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp index c275969d0bd..1659d21c9aa 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp @@ -235,8 +235,7 @@ TAO_Notify_ETCL_Filter::get_constraints (const CosNotifyFilter::ConstraintIDSeq { if (this->constraint_expr_list_.find (id_list[index], notify_constr_expr) == -1) - ACE_THROW_RETURN (CosNotifyFilter::ConstraintNotFound (id_list[index]), - 0); + throw CosNotifyFilter::ConstraintNotFound (id_list[index]); infoseq[index].constraint_expression = notify_constr_expr->constr_expr; @@ -340,8 +339,7 @@ TAO_Notify_ETCL_Filter::match (const CORBA::Any & /*filterable_data */) ACE_THROW_SPEC ((CORBA::SystemException, CosNotifyFilter::UnsupportedFilterableData)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean @@ -386,8 +384,7 @@ TAO_Notify_ETCL_Filter::match_typed ( ACE_THROW_SPEC (( CORBA::SystemException, CosNotifyFilter::UnsupportedFilterableData)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } CosNotifyFilter::CallbackID @@ -396,8 +393,7 @@ TAO_Notify_ETCL_Filter::attach_callback ( ) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -414,8 +410,7 @@ CosNotifyFilter::CallbackIDSeq * TAO_Notify_ETCL_Filter::get_callbacks (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp index 9c69dbad1d6..16aa8eb680e 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp @@ -37,7 +37,7 @@ TAO_Notify_ETCL_FilterFactory::create_filter (const char *constraint_grammar) if (ACE_OS::strcmp (constraint_grammar, "TCL") != 0 && ACE_OS::strcmp (constraint_grammar, "ETCL") != 0 && ACE_OS::strcmp (constraint_grammar, "EXTENDED_TCL") != 0) - ACE_THROW_RETURN (CosNotifyFilter::InvalidGrammar (), 0); + throw CosNotifyFilter::InvalidGrammar (); // Create the RefCounted servant. @@ -67,7 +67,7 @@ TAO_Notify_ETCL_FilterFactory::create_mapping_filter (const char * /*constraint_ CosNotifyFilter::InvalidGrammar )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyFilter::MappingFilter::_nil ()); + throw CORBA::NO_IMPLEMENT (); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.cpp index 455f6b089a2..9fe224e4481 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Event_Map_T.cpp @@ -86,7 +86,7 @@ TAO_Notify_Event_Map_T<PROXY, ACE_LOCK>::insert (PROXY* proxy, const TAO_Notify_ ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); if (map_.bind (event_type, entry) == -1) - ACE_THROW_RETURN (CORBA::NO_MEMORY (), -1); + throw CORBA::NO_MEMORY (); if (this->event_types_.insert (event_type) == -1) return -1; diff --git a/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp index 618e08e0955..ed4c59c177f 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/FilterAdmin.cpp @@ -29,7 +29,7 @@ TAO_Notify_FilterAdmin::add_filter (CosNotifyFilter::Filter_ptr new_filter) ACE_THROW_SPEC ((CORBA::SystemException)) { if (CORBA::is_nil (new_filter)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); + throw CORBA::BAD_PARAM (); ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_, CORBA::INTERNAL ()); @@ -40,8 +40,7 @@ TAO_Notify_FilterAdmin::add_filter (CosNotifyFilter::Filter_ptr new_filter) CosNotifyFilter::Filter::_duplicate (new_filter); if (this->filter_list_.bind (new_id, new_filter_var) == -1) - ACE_THROW_RETURN (CORBA::INTERNAL (), - 0); + throw CORBA::INTERNAL (); else return new_id; } @@ -74,8 +73,7 @@ TAO_Notify_FilterAdmin::get_filter (CosNotifyFilter::FilterID filter_id) if (this->filter_list_.find (filter_id, filter_var) == -1) - ACE_THROW_RETURN (CosNotifyFilter::FilterNotFound (), - 0); + throw CosNotifyFilter::FilterNotFound (); return filter_var._retn (); } @@ -177,7 +175,7 @@ TAO_Notify_FilterAdmin::load_child (const ACE_CString &type, CORBA::Long id, { this->filter_ids_.set_last_used(id); if (this->filter_list_.bind (id, filter) != 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } } return this; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Find_Worker_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Find_Worker_T.cpp index b487a8f01d9..b1fdb3ae7da 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Find_Worker_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Find_Worker_T.cpp @@ -33,8 +33,7 @@ TAO_Notify_Find_Worker_T<TYPE,INTERFACE,INTERFACE_PTR,EXCEPTION>::resolve (const this->find (id, container); if (this->result_ == 0) - ACE_THROW_RETURN (EXCEPTION () - , INTERFACE::_nil ()); + throw EXCEPTION (); CORBA::Object_var object = this->result_->ref (); diff --git a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp index 6bc0926361b..a45fcbfb5e3 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/ProxySupplier_T.cpp @@ -180,8 +180,7 @@ TAO_Notify_ProxySupplier_T<SERVANT_TYPE>::priority_filter (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CosNotifyFilter::MappingFilter::_nil ()); + throw CORBA::NO_IMPLEMENT (); } template <class SERVANT_TYPE> void @@ -199,8 +198,7 @@ TAO_Notify_ProxySupplier_T<SERVANT_TYPE>::lifetime_filter (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CosNotifyFilter::MappingFilter::_nil ()); + throw CORBA::NO_IMPLEMENT (); } template <class SERVANT_TYPE> void diff --git a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp index 344c0294e64..52f29971be4 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/SupplierAdmin.cpp @@ -349,7 +349,7 @@ TAO_Notify_SupplierAdmin::obtain_pull_consumer (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosEventChannelAdmin::ProxyPullConsumer::_nil ()); + throw CORBA::NO_IMPLEMENT (); } CosNotifyChannelAdmin::ProxyIDSeq* @@ -358,7 +358,7 @@ TAO_Notify_SupplierAdmin::pull_consumers (void) CORBA::SystemException )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } @@ -381,7 +381,7 @@ TAO_Notify_SupplierAdmin::obtain_notification_pull_consumer (CosNotifyChannelAdm , CosNotifyChannelAdmin::AdminLimitExceeded )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyChannelAdmin::ProxyConsumer::_nil ()); + throw CORBA::NO_IMPLEMENT (); } TAO_Notify_ProxyConsumer * diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_GenericFactory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_GenericFactory.cpp index b14d68eff4d..74bdc8574dd 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_GenericFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_GenericFactory.cpp @@ -109,8 +109,7 @@ TAO_PG_GenericFactory::create_object ( // that over 4 billion object groups are being managed by this // generic factory! if (this->next_fcid_ == fcid) - ACE_THROW_RETURN (PortableGroup::ObjectNotCreated (), - CORBA::Object::_nil ()); + throw PortableGroup::ObjectNotCreated (); } // Just in case this->next_fcid_ was modified in the above search, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp index 2b6abd2903b..0d02a65db04 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp @@ -95,7 +95,7 @@ TAO::PG_Object_Group * TAO::PG_Group_Factory::create_group ( PortableGroup::TagGroupTaggedComponent tagged_component; if (! TAO::PG_Utils::get_tagged_component (empty_group, tagged_component)) { - ACE_THROW_RETURN (PortableGroup::ObjectNotCreated(), 0); + throw PortableGroup::ObjectNotCreated(); } TAO::PG_Object_Group * objectGroup = 0; @@ -117,7 +117,7 @@ TAO::PG_Object_Group * TAO::PG_Group_Factory::create_group ( if (this->group_map_.bind (group_id, objectGroup) != 0) { delete objectGroup; - ACE_THROW_RETURN (PortableGroup::ObjectNotCreated(), 0); + throw PortableGroup::ObjectNotCreated(); } return objectGroup; } diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp index ff196d2d32c..a102044e10c 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp @@ -60,8 +60,7 @@ TAO_PG_ObjectGroupManager::create_member ( PortableGroup::InvalidCriteria, PortableGroup::CannotMeetCriteria)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - PortableGroup::ObjectGroup::_nil ()); + throw CORBA::NO_IMPLEMENT (); } PortableGroup::ObjectGroup_ptr @@ -75,8 +74,7 @@ TAO_PG_ObjectGroupManager::add_member ( PortableGroup::ObjectNotAdded)) { if (CORBA::is_nil (member)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - PortableGroup::ObjectGroup::_nil ()); + throw CORBA::BAD_PARAM (); ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, @@ -107,8 +105,7 @@ TAO_PG_ObjectGroupManager::_tao_add_member ( PortableGroup::NoFactory)) { if (CORBA::is_nil (member)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - PortableGroup::ObjectGroup::_nil ()); + throw CORBA::BAD_PARAM (); ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, @@ -171,16 +168,14 @@ TAO_PG_ObjectGroupManager::add_member_i ( { // The member's type_id does not match the object group's // type_id. - ACE_THROW_RETURN (PortableGroup::ObjectNotAdded (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectNotAdded (); } } TAO_PG_ObjectGroup_Array * groups = 0; if (this->location_map_.find (the_location, groups) == 0 && this->member_already_present (*groups, group_entry)) - ACE_THROW_RETURN (PortableGroup::MemberAlreadyPresent (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::MemberAlreadyPresent (); TAO_PG_MemberInfo member_info; member_info.member = CORBA::Object::_duplicate (member); @@ -201,8 +196,7 @@ TAO_PG_ObjectGroupManager::add_member_i ( // This should not fail! if (this->location_map_.bind (the_location, groups) != 0) { - ACE_THROW_RETURN (PortableGroup::ObjectNotAdded (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectNotAdded (); } (void) safe_groups.release (); @@ -218,8 +212,7 @@ TAO_PG_ObjectGroupManager::add_member_i ( // Don't bother checking for duplicates since a check is already // performed when binding to the location map above. if (group_entry->member_infos.insert_tail (member_info) != 0) - ACE_THROW_RETURN (PortableGroup::ObjectNotAdded (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectNotAdded (); return PortableGroup::ObjectGroup::_duplicate (object_group); } @@ -239,8 +232,7 @@ TAO_PG_ObjectGroupManager::remove_member ( TAO_PG_ObjectGroup_Array * groups = 0; if (this->location_map_.find (the_location, groups) != 0) - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectGroupNotFound (); // Multiple members from different object groups may reside at the // same location. Iterate through the list to attempt to find a @@ -298,8 +290,7 @@ TAO_PG_ObjectGroupManager::remove_member ( } } - ACE_THROW_RETURN (PortableGroup::MemberNotFound (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::MemberNotFound (); } PortableGroup::Locations * @@ -386,7 +377,7 @@ TAO_PG_ObjectGroupManager::get_object_group_id ( this->get_group_entry (object_group); if (entry == 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); // Only the lower 32 bits of the 64 bit PortableGroup::ObjectGroupId // are ever used. @@ -412,8 +403,7 @@ TAO_PG_ObjectGroupManager::get_object_group_ref ( } if (entry == 0) - ACE_THROW_RETURN (CORBA::INTERNAL (), - PortableGroup::ObjectGroup::_nil ()); + throw CORBA::INTERNAL (); // This implemenation does not change the object group reference. return PortableGroup::ObjectGroup::_duplicate (object_group); @@ -460,8 +450,7 @@ TAO_PG_ObjectGroupManager::get_member_ref ( // No member of the given object group is present at the given // location. - ACE_THROW_RETURN (PortableGroup::MemberNotFound (), - CORBA::Object::_nil ()); + throw PortableGroup::MemberNotFound (); } PortableGroup::ObjectGroup_ptr @@ -488,15 +477,13 @@ TAO_PG_ObjectGroupManager::get_object_group_ref_from_id ( group_entry) != 0) { - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectGroupNotFound (); } } if (group_entry == 0) { - ACE_THROW_RETURN (CORBA::INTERNAL (), - PortableGroup::ObjectGroup::_nil ()); + throw CORBA::INTERNAL (); } return @@ -511,7 +498,7 @@ TAO_PG_ObjectGroupManager::create_object_group ( const PortableGroup::Criteria & the_criteria) { if (CORBA::is_nil (this->poa_.in ())) - ACE_THROW_RETURN (CORBA::INTERNAL (), CORBA::Object::_nil ()); + throw CORBA::INTERNAL (); // Create a reference for the ObjectGroup corresponding to the // RepositoryId of the object being created. @@ -550,8 +537,7 @@ TAO_PG_ObjectGroupManager::create_object_group ( 0); if (this->object_group_map_.bind (oid, group_entry) != 0) - ACE_THROW_RETURN (PortableGroup::ObjectNotCreated (), - PortableGroup::ObjectGroup::_nil ()); + throw PortableGroup::ObjectNotCreated (); } (void) safe_group_entry.release (); @@ -666,7 +652,7 @@ TAO_PG_ObjectGroupManager::get_group_entry ( PortableGroup::ObjectGroupNotFound)) { if (CORBA::is_nil (this->poa_.in ())) - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); PortableServer::ObjectId_var oid; try @@ -690,8 +676,7 @@ TAO_PG_ObjectGroupManager::get_group_entry ( TAO_PG_ObjectGroup_Map_Entry * group_entry = 0; if (this->object_group_map_.find (oid.in (), group_entry) != 0) - ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), - 0); + throw PortableGroup::ObjectGroupNotFound (); return group_entry; } @@ -757,7 +742,7 @@ TAO_PG_ObjectGroupManager::valid_type_id ( // @todo Strategize this -- e.g. strict type checking. if (CORBA::is_nil (member)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), false); + throw CORBA::BAD_PARAM (); // Before we can use this code, i.e. the reverse lock, the // TAO_PG_ObjectGroup_Entry should be made so that it is reference diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp index 75649198581..15ca6723cba 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp @@ -315,8 +315,7 @@ TAO::PG_Object_Group::set_primary_member ( ACE_TEXT ("TAO-PG (%P|%t) - set_primary_location ") ACE_TEXT ("throwing MemberNotFound.\n"))); } - ACE_THROW_RETURN (PortableGroup::MemberNotFound(), - -1); + throw PortableGroup::MemberNotFound(); } return result; @@ -558,7 +557,7 @@ TAO::PG_Object_Group::get_member_reference ( } else { - ACE_THROW_RETURN (PortableGroup::MemberNotFound(), result._retn ()); + throw PortableGroup::MemberNotFound(); } return result._retn (); } diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp index 9ec7c80a093..6b37fcf84d0 100644 --- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp @@ -751,8 +751,7 @@ TAO_PropertySet::get_property_value (const char *property_name) { // Check the name's validity. if (property_name == 0) - ACE_THROW_RETURN (CosPropertyService::InvalidPropertyName(), - 0); + throw CosPropertyService::InvalidPropertyName(); // Get the value out of the hash table. @@ -760,8 +759,7 @@ TAO_PropertySet::get_property_value (const char *property_name) CosProperty_Hash_Value hash_value; if (this->hash_table_.find (hash_key, hash_value) != 0) - ACE_THROW_RETURN (CosPropertyService::PropertyNotFound(), - 0); + throw CosPropertyService::PropertyNotFound(); // Return the any value got. CORBA::Any *any_ptr =0; @@ -1339,8 +1337,7 @@ TAO_PropertySetDef::get_property_mode (const char *property_name) { // Check for the name's validity. if (property_name == 0) - ACE_THROW_RETURN (CosPropertyService::InvalidPropertyName(), - CosPropertyService::undefined); + throw CosPropertyService::InvalidPropertyName(); // Find the property in the hash table. CosProperty_Hash_Key hash_key (property_name); @@ -1355,8 +1352,7 @@ TAO_PropertySetDef::get_property_mode (const char *property_name) return hash_value.pmode_; default: // Error or property is not found. - ACE_THROW_RETURN (CosPropertyService::PropertyNotFound(), - CosPropertyService::undefined); + throw CosPropertyService::PropertyNotFound(); } } diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp index f46920825d3..cf28755865b 100644 --- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp +++ b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp @@ -62,8 +62,7 @@ ACE_Runtime_Scheduler::get (RtecScheduler::handle_t handle) RtecScheduler::UNKNOWN_TASK)) { if (handle <= 0 || handle > entry_count_) - ACE_THROW_RETURN (RtecScheduler::UNKNOWN_TASK (), - 0); + throw RtecScheduler::UNKNOWN_TASK (); // Note: there is no memory leak here, according to the CORBA spec, // we are supposed to allocate an structure and return it, the // caller owns it from then on. @@ -534,8 +533,7 @@ ACE_Runtime_Scheduler::last_scheduled_priority (void) { // throw an exception if a valid schedule has not been loaded if (config_count_ <= 0) - ACE_THROW_RETURN (RtecScheduler::NOT_SCHEDULED(), - (RtecScheduler::Preemption_Priority_t) -1); + throw RtecScheduler::NOT_SCHEDULED(); else return (RtecScheduler::Preemption_Priority_t) (config_count_ - 1); } diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ClientCredentials.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ClientCredentials.cpp index e8ed218c0b5..57d6e7f7f18 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ClientCredentials.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ClientCredentials.cpp @@ -35,49 +35,49 @@ char * TAO::SSLIOP::ClientCredentials::context_id (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::Principal * TAO::SSLIOP::ClientCredentials::client_principal (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::StatementList * TAO::SSLIOP::ClientCredentials::client_supporting_statements () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::ResourceNameList * TAO::SSLIOP::ClientCredentials::client_restricted_resources () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::Principal * TAO::SSLIOP::ClientCredentials::target_principal (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::StatementList * TAO::SSLIOP::ClientCredentials::target_supporting_statements () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::ResourceNameList * TAO::SSLIOP::ClientCredentials::target_restricted_resources () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::OwnCredentials_ptr @@ -113,14 +113,14 @@ CORBA::Boolean TAO::SSLIOP::ClientCredentials::target_authentication (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), false); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::ClientCredentials::confidentiality (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), false); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp index fae6be7238d..b9c7158bb91 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp @@ -149,8 +149,7 @@ TAO::SSLIOP::Connector::connect (TAO::Profile_Transport_Resolver *resolver, ACE_TEXT ("found in the IOR.\n"))); } - ACE_THROW_RETURN (CORBA::INV_POLICY (), // @@ Correct exception? - 0); + throw CORBA::INV_POLICY (); } // Check if the user overrode the default Quality-of-Protection for @@ -184,8 +183,7 @@ TAO::SSLIOP::Connector::connect (TAO::Profile_Transport_Resolver *resolver, ACE_TEXT ("found in the IOR.\n"))); } - ACE_THROW_RETURN (CORBA::INV_POLICY (), // @@ Correct exception? - 0); + throw CORBA::INV_POLICY (); } if ((!establish_trust && qop == ::Security::SecQOPNoProtection) @@ -370,12 +368,11 @@ TAO::SSLIOP::Connector::iiop_connect ( // connection, and subsequently the request, from completing. if (ACE_BIT_DISABLED (ssl_component.target_supports, ::Security::NoProtection)) - ACE_THROW_RETURN (CORBA::NO_PERMISSION ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - EPERM), - CORBA::COMPLETED_NO), - 0); + throw CORBA::NO_PERMISSION ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + EPERM), + CORBA::COMPLETED_NO); TAO_IIOP_Endpoint *iiop_endpoint = ssl_endpoint->iiop_endpoint (); @@ -415,12 +412,11 @@ TAO::SSLIOP::Connector::ssliop_connect ( // SSL connection from occuring. if (ACE_BIT_ENABLED (ssl_component.target_requires, ::Security::NoProtection)) - ACE_THROW_RETURN (CORBA::NO_PERMISSION ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - EPERM), - CORBA::COMPLETED_NO), - 0); + throw CORBA::NO_PERMISSION ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + EPERM), + CORBA::COMPLETED_NO); // If the invocation wants integrity without confidentiality but the // server does not support "no protection," then it won't be @@ -432,7 +428,7 @@ TAO::SSLIOP::Connector::ssliop_connect ( if (ACE_BIT_DISABLED (ssl_component.target_supports, ::Security::NoProtection) && qop == ::Security::SecQOPIntegrity) - ACE_THROW_RETURN (CORBA::INV_POLICY (), 0); + throw CORBA::INV_POLICY (); const ACE_INET_Addr &remote_address = ssl_endpoint->object_addr (); @@ -601,7 +597,7 @@ TAO::SSLIOP::Connector::ssliop_connect ( ACE_TEXT ("(%P|%t) Unable to set eNULL ") ACE_TEXT ("SSL cipher.\n"))); - ACE_THROW_RETURN (CORBA::INV_POLICY (), 0); + throw CORBA::INV_POLICY (); } svc_handler = safe_handler.release (); diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp index 8a0ef38e424..57df3355bd6 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Credentials.cpp @@ -111,8 +111,7 @@ TAO::SSLIOP_Credentials::creds_state (void) // The pointer to the underlying X509 structure should only be zero // if destroy() was called on this Credentials object. if (x == 0) - ACE_THROW_RETURN (CORBA::BAD_OPERATION (), - SecurityLevel3::CS_Invalid); + throw CORBA::BAD_OPERATION (); if (this->creds_state_ == SecurityLevel3::CS_Valid) { @@ -124,8 +123,7 @@ TAO::SSLIOP_Credentials::creds_state (void) if (after_status == 0) { // Error in certificate's "not after" field. - ACE_THROW_RETURN (CORBA::BAD_PARAM (), // @@ Correct exception? - SecurityLevel3::CS_Invalid); + throw CORBA::BAD_PARAM (); } else if (after_status > 0) // Certificate has expired. this->creds_state_ = SecurityLevel3::CS_Expired; @@ -140,8 +138,7 @@ TAO::SSLIOP_Credentials::creds_state (void) if (before_status == 0) { // Error in certificate's "not before" field. - ACE_THROW_RETURN (CORBA::BAD_PARAM (), // @@ Correct exception? - SecurityLevel3::CS_Invalid); + throw CORBA::BAD_PARAM (); } else if (before_status < 0) // Certificate is now valid. this->creds_state_ = SecurityLevel3::CS_Valid; @@ -155,7 +152,7 @@ TAO::SSLIOP_Credentials::add_relinquished_listener ( SecurityLevel3::RelinquishedCredentialsListener_ptr /* listener */) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp index 3e866342315..8263bb166ec 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp @@ -123,7 +123,7 @@ TAO::SSLIOP::CredentialsAcquirer::get_continuation_data () ACE_THROW_SPEC ((CORBA::SystemException)) { // SSL/TLS credentials acquisition does generate continuation data. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + throw CORBA::BAD_INV_ORDER (); } SecurityLevel3::AcquisitionStatus @@ -132,8 +132,7 @@ TAO::SSLIOP::CredentialsAcquirer::continue_acquisition ( ACE_THROW_SPEC ((CORBA::SystemException)) { // SSL/TLS credentials acquisition does generate continuation data. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), - SecurityLevel3::AQST_Failed); + throw CORBA::BAD_INV_ORDER (); } SecurityLevel3::OwnCredentials_ptr @@ -145,20 +144,17 @@ TAO::SSLIOP::CredentialsAcquirer::get_credentials (CORBA::Boolean on_list) ::SSLIOP::AuthData *data; if (!(this->acquisition_arguments_ >>= data)) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - SecurityLevel3::OwnCredentials::_nil ()); + throw CORBA::BAD_PARAM (); TAO::SSLIOP::X509_var x509 = this->make_X509 (data->certificate); if (x509.in () == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - SecurityLevel3::OwnCredentials::_nil ()); + throw CORBA::BAD_PARAM (); TAO::SSLIOP::EVP_PKEY_var evp = this->make_EVP_PKEY (data->key); if (evp.in () == 0) - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - SecurityLevel3::OwnCredentials::_nil ()); + throw CORBA::BAD_PARAM (); // Verify that the private key is consistent with the certificate. if (::X509_check_private_key (x509.in (), evp.in ()) != 1) @@ -168,8 +164,7 @@ TAO::SSLIOP::CredentialsAcquirer::get_credentials (CORBA::Boolean on_list) ACE_TEXT ("(%P|%t) ERROR: Private key is not ") ACE_TEXT ("consistent with X.509 certificate"))); - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - SecurityLevel3::OwnCredentials::_nil ()); + throw CORBA::BAD_PARAM (); } TAO::SSLIOP::OwnCredentials * creds; diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current.cpp index 4e6a1a8bab5..07d732ea5d8 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current.cpp @@ -34,7 +34,7 @@ TAO::SSLIOP::Current::get_peer_certificate () // we're not in the middle of a request or an upcall. Throw an // exception to indicate that. if (impl == 0) - ACE_THROW_RETURN (::SSLIOP::Current::NoContext (), 0); + throw ::SSLIOP::Current::NoContext (); // A valid value must always be returned, so instantiate a sequence // regardless of whether or not it is populated with certificates. @@ -66,7 +66,7 @@ TAO::SSLIOP::Current::get_peer_certificate_chain () // we're not in the middle of a request or an upcall. Throw an // exception to indicate that. if (impl == 0) - ACE_THROW_RETURN (SSLIOP::Current::NoContext (), 0); + throw SSLIOP::Current::NoContext (); // A valid value must always be returned, so instantiate a sequence // regardless of whether or not it is populated with certificates. diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp index c70172bf4b8..14feb39226f 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp @@ -31,8 +31,7 @@ TAO::SSLIOP::Current_Impl::client_credentials () { TAO::SSLIOP::X509_var cert = ::SSL_get_peer_certificate (this->ssl_); if (cert.ptr () == 0) - ACE_THROW_RETURN (CORBA::BAD_OPERATION (), - SecurityLevel3::ClientCredentials::_nil ()); + throw CORBA::BAD_OPERATION (); SecurityLevel3::ClientCredentials_ptr creds; ACE_NEW_THROW_EX (creds, @@ -52,7 +51,7 @@ CORBA::Boolean TAO::SSLIOP::Current_Impl::request_is_local (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp index 102fbeb2246..ba53b70281c 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ORBInitializer.cpp @@ -207,7 +207,7 @@ TAO::SSLIOP::ORBInitializer::get_tss_slot_id ( "Unable to obtain TSS slot ID from " "\"SecurityCurrent\" object.\n")); - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw CORBA::INTERNAL (); } return security_current->tss_slot (); diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_OwnCredentials.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_OwnCredentials.cpp index 20e20a6bc3c..5f9dceb49bb 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_OwnCredentials.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_OwnCredentials.cpp @@ -53,16 +53,14 @@ SecurityLevel3::CredsInitiator_ptr TAO::SSLIOP::OwnCredentials::creds_initiator (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - SecurityLevel3::CredsInitiator::_nil ()); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::CredsAcceptor_ptr TAO::SSLIOP::OwnCredentials::creds_acceptor (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - SecurityLevel3::CredsAcceptor::_nil ()); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_TargetCredentials.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_TargetCredentials.cpp index 418b6d60600..13b3ed1e1d8 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_TargetCredentials.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_TargetCredentials.cpp @@ -25,99 +25,98 @@ char * TAO::SSLIOP::TargetCredentials::context_id (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::Principal * TAO::SSLIOP::TargetCredentials::client_principal (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::StatementList * TAO::SSLIOP::TargetCredentials::client_supporting_statements () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::ResourceNameList * TAO::SSLIOP::TargetCredentials::client_restricted_resources () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::Principal * TAO::SSLIOP::TargetCredentials::target_principal (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::StatementList * TAO::SSLIOP::TargetCredentials::target_supporting_statements () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::ResourceNameList * TAO::SSLIOP::TargetCredentials::target_restricted_resources () ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::OwnCredentials_ptr TAO::SSLIOP::TargetCredentials::parent_credentials (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - SecurityLevel3::OwnCredentials::_nil ()); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::TargetCredentials::client_authentication (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::TargetCredentials::target_authentication (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::TargetCredentials::confidentiality (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::TargetCredentials::integrity (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::TargetCredentials::target_embodied (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean TAO::SSLIOP::TargetCredentials::target_endorsed (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); + throw CORBA::NO_IMPLEMENT (); } void diff --git a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp index fead117c9f7..6f2b48501c6 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp @@ -228,11 +228,11 @@ init (int config_count, { case -1: // Something bad but unknown occurred while trying to bind in map. - ACE_THROW_RETURN (RtecScheduler::INTERNAL (), -1); + throw RtecScheduler::INTERNAL (); case 1: // Tried to bind an operation that was already in the map. - ACE_THROW_RETURN (RtecScheduler::DUPLICATE_NAME (), -1); + throw RtecScheduler::DUPLICATE_NAME (); default: break; @@ -269,7 +269,7 @@ init (int config_count, if (new_rt_info == 0) { - ACE_THROW_RETURN (RtecScheduler::INTERNAL (), -1); + throw RtecScheduler::INTERNAL (); } // Set the new info's enabled state @@ -511,7 +511,7 @@ get (RtecScheduler::handle_t handle) TAO_RT_Info_Ex *rt_info = 0; if (rt_info_map_.find (handle, rt_info) != 0) { - ACE_THROW_RETURN (RtecScheduler::UNKNOWN_TASK (), 0); + throw RtecScheduler::UNKNOWN_TASK (); } // Allocate a new RT_Info @@ -1610,8 +1610,7 @@ last_scheduled_priority (void) if ((this->stability_flags_ & SCHED_PRIORITY_NOT_STABLE) && this->enforce_schedule_stability_) { - ACE_THROW_RETURN (RtecScheduler::NOT_SCHEDULED (), - (RtecScheduler::Preemption_Priority_t) -1); + throw RtecScheduler::NOT_SCHEDULED (); } return last_scheduled_priority_; @@ -1708,19 +1707,19 @@ create_i (const char *entry_point, { case -1: // Something bad but unknown occurred while trying to bind in map. - ACE_THROW_RETURN (RtecScheduler::INTERNAL (), 0); + throw RtecScheduler::INTERNAL (); case 1: // Tried to bind an operation that was already in the map. if (ignore_duplicates) { // Should never get here unless something is badly awry. - ACE_THROW_RETURN (RtecScheduler::INTERNAL (), 0); + throw RtecScheduler::INTERNAL (); } else { // Already bound, and we're not ignoring duplicates. - ACE_THROW_RETURN (RtecScheduler::DUPLICATE_NAME (), 0); + throw RtecScheduler::DUPLICATE_NAME (); } default: @@ -1734,12 +1733,12 @@ create_i (const char *entry_point, case -1: // Something bad but unknown occurred while trying to bind in tree. rt_info_map_.unbind (handle); - ACE_THROW_RETURN (RtecScheduler::INTERNAL (), 0); + throw RtecScheduler::INTERNAL (); case 1: // Tried to bind an operation that was already in the tree. rt_info_map_.unbind (handle); - ACE_THROW_RETURN (RtecScheduler::DUPLICATE_NAME (), 0); + throw RtecScheduler::DUPLICATE_NAME (); default: break; @@ -1903,7 +1902,7 @@ lookup_i (const char * entry_point) TAO_RT_Info_Ex *rt_info = 0; if (rt_info_tree_.find (entry_point, rt_info) != 0) { - ACE_THROW_RETURN (RtecScheduler::UNKNOWN_TASK (), 0); + throw RtecScheduler::UNKNOWN_TASK (); } return rt_info->handle; diff --git a/TAO/orbsvcs/orbsvcs/Security/SL3_CredentialsCurator.cpp b/TAO/orbsvcs/orbsvcs/Security/SL3_CredentialsCurator.cpp index 612b818c930..51a7a41fd9d 100644 --- a/TAO/orbsvcs/orbsvcs/Security/SL3_CredentialsCurator.cpp +++ b/TAO/orbsvcs/orbsvcs/Security/SL3_CredentialsCurator.cpp @@ -119,8 +119,7 @@ TAO::SL3::CredentialsCurator::acquire_credentials ( acquisition_arguments); } - ACE_THROW_RETURN (CORBA::BAD_PARAM (), - SecurityLevel3::CredentialsAcquirer::_nil ()); + throw CORBA::BAD_PARAM (); } diff --git a/TAO/orbsvcs/orbsvcs/Security/SL3_PolicyFactory.cpp b/TAO/orbsvcs/orbsvcs/Security/SL3_PolicyFactory.cpp index ecc4c6b6513..46673a4f17d 100644 --- a/TAO/orbsvcs/orbsvcs/Security/SL3_PolicyFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Security/SL3_PolicyFactory.cpp @@ -24,8 +24,7 @@ TAO::SL3::PolicyFactory::create_policy (CORBA::PolicyType type, { SecurityLevel3::ContextEstablishmentPolicyArgument * arg = 0; if (!(value >>= arg)) - ACE_THROW_RETURN (CORBA::INTERNAL (), - policy); + throw CORBA::INTERNAL (); ACE_NEW_THROW_EX (policy, TAO::SL3::ContextEstablishmentPolicy ( @@ -41,8 +40,7 @@ TAO::SL3::PolicyFactory::create_policy (CORBA::PolicyType type, { SecurityLevel3::ObjectCredentialsPolicyArgument * creds = 0; if (!(value >>= creds)) - ACE_THROW_RETURN (CORBA::INTERNAL (), - policy); + throw CORBA::INTERNAL (); ACE_NEW_THROW_EX (policy, TAO::SL3::ObjectCredentialsPolicy (*creds), @@ -50,8 +48,7 @@ TAO::SL3::PolicyFactory::create_policy (CORBA::PolicyType type, } else { - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - policy); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); } return policy; diff --git a/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityCurrent.cpp b/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityCurrent.cpp index 04ada737774..b1190ade3b2 100644 --- a/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityCurrent.cpp +++ b/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityCurrent.cpp @@ -36,8 +36,7 @@ TAO::SL3::SecurityCurrent::client_credentials (void) // we're not in the middle of a request/upcall. Throw an exception // to indicate that. if (impl == 0) - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), - SecurityLevel3::ClientCredentials::_nil ()); + throw CORBA::BAD_INV_ORDER (); return impl->client_credentials (); } @@ -52,7 +51,7 @@ TAO::SL3::SecurityCurrent::request_is_local (void) // we're not in the middle of a request/upcall. Throw an exception // to indicate that. if (impl == 0) - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), false); + throw CORBA::BAD_INV_ORDER (); return impl->request_is_local (); } diff --git a/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityManager.cpp b/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityManager.cpp index 033908152ec..4053a5c4664 100644 --- a/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityManager.cpp +++ b/TAO/orbsvcs/orbsvcs/Security/SL3_SecurityManager.cpp @@ -35,8 +35,7 @@ SecurityLevel3::TargetCredentials_ptr TAO::SL3::SecurityManager::get_target_credentials (CORBA::Object_ptr /* the_object */) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - SecurityLevel3::TargetCredentials::_nil ()); + throw CORBA::NO_IMPLEMENT (); } SecurityLevel3::ContextEstablishmentPolicy_ptr diff --git a/TAO/orbsvcs/orbsvcs/Security/Security_Current.cpp b/TAO/orbsvcs/orbsvcs/Security/Security_Current.cpp index 657f66b3dec..9aa967a3dfc 100644 --- a/TAO/orbsvcs/orbsvcs/Security/Security_Current.cpp +++ b/TAO/orbsvcs/orbsvcs/Security/Security_Current.cpp @@ -36,7 +36,7 @@ TAO_Security_Current::get_attributes ( // we're not in the middle of a request/upcall. Throw an exception // to indicate that. if (impl == 0) - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + throw CORBA::BAD_INV_ORDER (); return impl->get_attributes (attributes); } @@ -51,7 +51,7 @@ TAO_Security_Current::received_credentials () // we're not in the middle of a request/upcall. Throw an exception // to indicate that. if (impl == 0) - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + throw CORBA::BAD_INV_ORDER (); return impl->received_credentials (); } diff --git a/TAO/orbsvcs/orbsvcs/Security/Security_PolicyFactory.cpp b/TAO/orbsvcs/orbsvcs/Security/Security_PolicyFactory.cpp index cb91d9c18ec..13b460849a1 100644 --- a/TAO/orbsvcs/orbsvcs/Security/Security_PolicyFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Security/Security_PolicyFactory.cpp @@ -37,12 +37,11 @@ TAO::Security::PolicyFactory::create_policy ( // Extract the desired Quality-of-Protection value from the // given Any. if (!(value >>= qop)) - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - EINVAL), - CORBA::COMPLETED_NO), - CORBA::Policy::_nil ()); + throw CORBA::BAD_PARAM ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + EINVAL), + CORBA::COMPLETED_NO); TAO::Security::QOPPolicy * qop_policy = 0; ACE_NEW_THROW_EX (qop_policy, @@ -63,12 +62,11 @@ TAO::Security::PolicyFactory::create_policy ( // Extract the desired establishing of trust value from the // given Any. if (!(value >>= trust)) - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - EINVAL), - CORBA::COMPLETED_NO), - CORBA::Policy::_nil ()); + throw CORBA::BAD_PARAM ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + EINVAL), + CORBA::COMPLETED_NO); TAO::Security::EstablishTrustPolicy * trust_policy = 0; ACE_NEW_THROW_EX (trust_policy, @@ -89,12 +87,11 @@ TAO::Security::PolicyFactory::create_policy ( // Extract the desired establishing of trust value from the // given Any. if (!(value >>= args)) - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - EINVAL), - CORBA::COMPLETED_NO), - CORBA::Policy::_nil ()); + throw CORBA::BAD_PARAM ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + EINVAL), + CORBA::COMPLETED_NO); TAO::SL3::ContextEstablishmentPolicy * policy = 0; ACE_NEW_THROW_EX (policy, @@ -121,12 +118,11 @@ TAO::Security::PolicyFactory::create_policy ( // Extract the desired establishing of trust value from the // given Any. if (!(value >>= creds)) - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - EINVAL), - CORBA::COMPLETED_NO), - CORBA::Policy::_nil ()); + throw CORBA::BAD_PARAM ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + EINVAL), + CORBA::COMPLETED_NO); TAO::SL3::ObjectCredentialsPolicy * policy = 0; ACE_NEW_THROW_EX (policy, @@ -144,11 +140,9 @@ TAO::Security::PolicyFactory::create_policy ( || type == ::Security::SecMechanismsPolicy || type == ::Security::SecFeaturePolicy // Deprecated. || type == ::Security::SecDelegationDirectivePolicy) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::UNSUPPORTED_POLICY), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::UNSUPPORTED_POLICY); else - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Clerk.cpp b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Clerk.cpp index d4db0eb7c17..a5beeef1071 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Clerk.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Clerk.cpp @@ -65,8 +65,7 @@ TAO_Time_Service_Clerk::secure_universal_time (void) ACE_THROW_SPEC ((CORBA::SystemException, CosTime::TimeUnavailable)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CosTime::UTO::_nil ()); + throw CORBA::NO_IMPLEMENT (); } // This creates a new UTO based on the given parameters. diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp index 78b5861e658..3a76a856761 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp @@ -60,8 +60,7 @@ TAO_Time_Service_Server::secure_universal_time (void) ACE_THROW_SPEC ((CORBA::SystemException, CosTime::TimeUnavailable)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CosTime::UTO::_nil ()); + throw CORBA::NO_IMPLEMENT (); } // This creates a new UTO based on the given parameters. diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp index 54e0f361dea..6120de02e60 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp @@ -163,8 +163,7 @@ remove_offer (const CosTrading::OfferId offer_id) if (this->remove_offer (stype, index) == -1) - ACE_THROW_RETURN (CosTrading::UnknownOfferId (offer_id), - -1); + throw CosTrading::UnknownOfferId (offer_id); return 0; } @@ -181,7 +180,7 @@ lookup_offer (const CosTrading::OfferId offer_id, this->parse_offer_id (offer_id, type_name, index); if ((offer = this->lookup_offer (type_name, index)) == 0) - ACE_THROW_RETURN (CosTrading::UnknownOfferId (offer_id), offer); + throw CosTrading::UnknownOfferId (offer_id); return offer; } @@ -200,7 +199,7 @@ lookup_offer (const CosTrading::OfferId offer_id) this->parse_offer_id (offer_id, type_name, index); if ((offer = this->lookup_offer (type_name, index)) == 0) - ACE_THROW_RETURN (CosTrading::UnknownOfferId (offer_id), offer); + throw CosTrading::UnknownOfferId (offer_id); return offer; } diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.cpp index 074414e3eda..234a828edcb 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.cpp @@ -196,8 +196,7 @@ TAO_Offer_Iterator_Collection::max_left (void) ACE_THROW_SPEC ((CORBA::SystemException, CosTrading::UnknownMaxLeft)) { - ACE_THROW_RETURN (CosTrading::UnknownMaxLeft(), - 0); + throw CosTrading::UnknownMaxLeft(); } TAO_Offer_Id_Iterator::TAO_Offer_Id_Iterator (void) diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp index 1c83064566d..2af97d90c98 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp @@ -95,14 +95,12 @@ add_type (const char *name, // Make sure Type name is valid. if (TAO_Trader_Base::is_valid_identifier_name (name) == 0) - ACE_THROW_RETURN (CosTrading::IllegalServiceType (name), - this->incarnation_); + throw CosTrading::IllegalServiceType (name); // Check if the service type already exists. CORBA::String_var type_name (name); if (this->type_map_.find (type_name) == 0) - ACE_THROW_RETURN (CosTradingRepos::ServiceTypeRepository::ServiceTypeExists (), - this->incarnation_); + throw CosTradingRepos::ServiceTypeRepository::ServiceTypeExists (); // Make sure all property names are valid and appear only once. this->validate_properties (prop_map, @@ -122,8 +120,7 @@ add_type (const char *name, // Instead, we do this: // if (if_name == 0) - ACE_THROW_RETURN (CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch (), - this->incarnation_); + throw CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch (); // Collect and make sure that properties of all supertypes and this // type are compatible. We can use prop_map and super_types_map for @@ -248,8 +245,7 @@ describe_type (const char * name) Service_Type_Map::ENTRY *type_entry = 0; if (this->type_map_.find (type_name, type_entry) == -1) - ACE_THROW_RETURN (CosTrading::UnknownServiceType (name), - (CosTradingRepos::ServiceTypeRepository::TypeStruct *) 0); + throw CosTrading::UnknownServiceType (name); // Return appropriate information about the type. CosTradingRepos::ServiceTypeRepository::TypeStruct *descr = 0; @@ -281,8 +277,7 @@ fully_describe_type (const char *name) CosTrading::UnknownServiceType)) { if (TAO_Trader_Base::is_valid_identifier_name (name) == 0) - ACE_THROW_RETURN (CosTrading::IllegalServiceType (name), - 0); + throw CosTrading::IllegalServiceType (name); ACE_READ_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_, CORBA::INTERNAL ()); @@ -291,8 +286,7 @@ fully_describe_type (const char *name) Service_Type_Map::ENTRY *type_entry = 0; if (this->type_map_.find (type_name, type_entry) == -1) - ACE_THROW_RETURN (CosTrading::UnknownServiceType (name), - 0); + throw CosTrading::UnknownServiceType (name); // Return appropriate information about the type. CosTradingRepos::ServiceTypeRepository::TypeStruct *descr = 0; diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp index 35324eab393..00fee26edc4 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp @@ -854,7 +854,7 @@ _cxx_export (CORBA::Object_ptr reference, { // For robustness purposes -- if (CORBA::is_nil (reference)) - ACE_THROW_RETURN (CosTrading::Register::InvalidObjectRef (), 0); + throw CosTrading::Register::InvalidObjectRef (); // Get service type map TAO_Offer_Database<MAP_LOCK_TYPE> &offer_database = this->trader_.offer_database (); @@ -873,14 +873,13 @@ _cxx_export (CORBA::Object_ptr reference, // Oops the type is masked, we shouldn't let exporters know the type // exists. if (type_struct->masked) - ACE_THROW_RETURN (CosTrading::UnknownServiceType (type), 0); + throw CosTrading::UnknownServiceType (type); // TAO-specific way to determine if an object is derived from or is // an interface type. int check = (! reference->_is_a (type_struct->if_name)); if (check) - ACE_THROW_RETURN (CosTrading::Register:: - InterfaceTypeMismatch (type, reference), 0); + throw CosTrading::Register::InterfaceTypeMismatch (type, reference); // Validate that the properties defined for this offer are correct // to their types and strength. @@ -1089,8 +1088,7 @@ resolve (const CosTrading::TraderName &name) { // Determine if the first link is a legal link name. if (! TAO_Trader_Base::is_valid_link_name (name[0])) - ACE_THROW_RETURN (CosTrading::Register::IllegalTraderName (name), - CosTrading::Register::_nil ()); + throw CosTrading::Register::IllegalTraderName (name); // Grab a reference to the link interface, and get a link description. CosTrading::Link_ptr link_if = @@ -1118,8 +1116,7 @@ resolve (const CosTrading::TraderName &name) // Ensure that the register pointer isn't nil. if (! CORBA::is_nil (remote_reg.in ())) - ACE_THROW_RETURN (CosTrading::Register::RegisterNotSupported (name), - CosTrading::Register::_nil ()); + throw CosTrading::Register::RegisterNotSupported (name); CosTrading::Register_ptr return_value = remote_reg.in (); @@ -1652,14 +1649,13 @@ TAO_Link<TRADER_LOCK_TYPE,MAP_LOCK_TYPE>::describe_link (const char *name) { // Ensure the link name is valid. if (! TAO_Trader_Base::is_valid_link_name (name)) - ACE_THROW_RETURN (CosTrading::Link::IllegalLinkName (name), 0); + throw CosTrading::Link::IllegalLinkName (name); // Ensure this isn't a duplicate link name. typename Links::ENTRY* link_entry = 0; CORBA::String_var link_name (name); if (this->links_.find (link_name, link_entry) == -1) - ACE_THROW_RETURN (CosTrading::Link::UnknownLinkName (name), - 0); + throw CosTrading::Link::UnknownLinkName (name); // Build a new Link Info structure. CosTrading::Link::LinkInfo* new_link_info = 0; @@ -1784,7 +1780,7 @@ export_proxy (CosTrading::Lookup_ptr, CosTrading::DuplicatePropertyName, CosTrading::DuplicatePolicyName)) { - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); ACE_NOTREACHED (return 0;) } @@ -1810,7 +1806,7 @@ describe_proxy (const char *) CosTrading::UnknownOfferId, CosTrading::Proxy::NotProxyOfferId)) { - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); ACE_NOTREACHED (return 0;) } diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp index 4c51123734e..63677b80def 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp @@ -278,11 +278,10 @@ TAO_Property_Evaluator::property_value (int index) if (CORBA::is_nil (dp_eval.in ())) { - ACE_THROW_RETURN (CosTradingDynamic:: - DPEvalFailure (name, - CORBA::TypeCode::_nil (), - CORBA::Any ()), - prop_val); + throw CosTradingDynamic::DPEvalFailure ( + name, + CORBA::TypeCode::_nil (), + CORBA::Any ()); } else { @@ -608,8 +607,7 @@ TAO_Policies::ulong_prop (POLICY_TYPE pol) const CORBA::Boolean equal_ulong = type->equal (CORBA::_tc_ulong); if (!equal_ulong) - ACE_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy), - return_value); + throw CosTrading::Lookup::PolicyTypeMismatch (*policy); else value >>= return_value; @@ -678,8 +676,7 @@ TAO_Policies::boolean_prop (POLICY_TYPE pol) const type->equal (CORBA::_tc_boolean); if (!equal_boolean) - ACE_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy), - return_value); + throw CosTrading::Lookup::PolicyTypeMismatch (*policy); else value >>= CORBA::Any::to_boolean (return_value); @@ -744,8 +741,7 @@ TAO_Policies::starting_trader (void) const if (!equal_tradername || !equal_linknameseq) - ACE_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy), - trader_name); + throw CosTrading::Lookup::PolicyTypeMismatch (*policy); else value >>= trader_name; } @@ -774,8 +770,7 @@ TAO_Policies::link_follow_rule (void) const type->equal (CosTrading::_tc_FollowOption); if (!type_equal) - ACE_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy), - return_value); + throw CosTrading::Lookup::PolicyTypeMismatch (*policy); else value >>= return_value; @@ -834,8 +829,7 @@ TAO_Policies::request_id (void) const type->equal (CosTrading::Admin::_tc_OctetSeq); if (!equal_octetseq) - ACE_THROW_RETURN (CosTrading::Lookup::PolicyTypeMismatch (*policy), - request_id); + throw CosTrading::Lookup::PolicyTypeMismatch (*policy); else value >>= request_id; } diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.cpp b/TAO/orbsvcs/tests/Concurrency/CC_command.cpp index 7072b482fc6..f9a2f695b3f 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.cpp +++ b/TAO/orbsvcs/tests/Concurrency/CC_command.cpp @@ -66,7 +66,7 @@ CC_Command::GetLockSet (const char *lock_set_name) // No lock set name was given. Use the global lock set. if(cc_lockset_.in()==0) { - ACE_THROW_RETURN (CORBA::UNKNOWN (), 0); + throw CORBA::UNKNOWN (); } else ccls_ret = cc_lockset_.in (); diff --git a/TAO/orbsvcs/tests/CosEvent/lib/Counting_Supplier.cpp b/TAO/orbsvcs/tests/CosEvent/lib/Counting_Supplier.cpp index dce9ffb7e2e..ffd0b5644d7 100644 --- a/TAO/orbsvcs/tests/CosEvent/lib/Counting_Supplier.cpp +++ b/TAO/orbsvcs/tests/CosEvent/lib/Counting_Supplier.cpp @@ -183,7 +183,7 @@ CEC_Pull_Counting_Supplier::pull (void) ACE_THROW_SPEC ((CORBA::SystemException,CosEventComm::Disconnected)) { if (CORBA::is_nil (this->consumer_proxy_.in ())) - ACE_THROW_RETURN (CosEventComm::Disconnected (), 0); + throw CosEventComm::Disconnected (); if (this->event_count % 2) { @@ -203,7 +203,7 @@ CEC_Pull_Counting_Supplier::try_pull (CORBA::Boolean_out has_event) ACE_THROW_SPEC ((CORBA::SystemException,CosEventComm::Disconnected)) { if (CORBA::is_nil (this->consumer_proxy_.in ())) - ACE_THROW_RETURN (CosEventComm::Disconnected (), 0); + throw CosEventComm::Disconnected (); if (this->event_count % 2) { diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp index 034cbf0b394..9e499db70be 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp @@ -206,7 +206,7 @@ ECMS_Driver::supplier_task (Test_Supplier *supplier, // The typecode name standard, the encode method is not (in // general the CDR interface is not specified). if (!(cdr << info)) - ACE_THROW_RETURN (CORBA::MARSHAL (), 0); + throw CORBA::MARSHAL (); // Here we marshall a non-IDL type. cdr << other; diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp index ef5097c6c7a..0be36c4b49b 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp @@ -79,7 +79,7 @@ EC_Wrapper::for_consumers (void) if (this->ec_impl_) return this->ec_impl_->for_consumers (); else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), RtecEventChannelAdmin::ConsumerAdmin::_nil()); + throw CORBA::OBJECT_NOT_EXIST (); } RtecEventChannelAdmin::SupplierAdmin_ptr @@ -89,7 +89,7 @@ EC_Wrapper::for_suppliers (void) if (this->ec_impl_) return this->ec_impl_->for_suppliers (); else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), RtecEventChannelAdmin::SupplierAdmin::_nil()); + throw CORBA::OBJECT_NOT_EXIST (); } void @@ -135,7 +135,7 @@ EC_Wrapper::append_observer (RtecEventChannelAdmin::Observer_ptr observer) if (this->ec_impl_) return this->ec_impl_->append_observer (observer); else - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } void diff --git a/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp b/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp index bdccea37752..36f13748307 100644 --- a/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp +++ b/TAO/orbsvcs/tests/FT_App/FT_ReplicaFactory_i.cpp @@ -634,7 +634,7 @@ CORBA::Object_ptr FT_ReplicaFactory_i::create_object ( "Throwing 'InvalidCriteria' due to missing %s\n", missingParameterName )); - ACE_THROW_RETURN ( PortableGroup::InvalidCriteria(), 0); + throw PortableGroup::InvalidCriteria(); } FT_TestReplica_i * replica = create_replica(role); @@ -643,7 +643,7 @@ CORBA::Object_ptr FT_ReplicaFactory_i::create_object ( ACE_ERROR ((LM_ERROR, "New Replica_i returned NULL. Throwing ObjectNotCreated.\n" )); - ACE_THROW_RETURN ( PortableGroup::ObjectNotCreated(), 0); + throw PortableGroup::ObjectNotCreated(); } ACE_NEW_THROW_EX ( factory_creation_id, diff --git a/TAO/orbsvcs/tests/FT_App/FT_TestReplica_i.cpp b/TAO/orbsvcs/tests/FT_App/FT_TestReplica_i.cpp index 6d6d18de21a..4ce192fa90d 100644 --- a/TAO/orbsvcs/tests/FT_App/FT_TestReplica_i.cpp +++ b/TAO/orbsvcs/tests/FT_App/FT_TestReplica_i.cpp @@ -95,23 +95,21 @@ namespace #define KEVORKIAN_RETURN(value, method, result) \ if (this->death_pending_ == (FT_TEST::TestReplica::value)){ \ suicide (#value " in method " #method); \ - ACE_THROW_RETURN (FAULT_CODE ( \ - CORBA::SystemException::_tao_minor_code ( \ - TAO::VMCID, \ - EFAULT), \ - CORBA::COMPLETED_NO), \ - result); \ + throw FAULT_CODE ( + \CORBA::SystemException::_tao_minor_code ( + \TAO::VMCID, + \EFAULT), + \CORBA::COMPLETED_NO); \ } else ; #define KEVORKIAN_DURING_RETURN(method, result) \ if (this->death_pending_ == FT_TEST::TestReplica::BEFORE_REPLY ){\ suicide ("read-only method " #method); \ - ACE_THROW_RETURN (FAULT_CODE ( \ - CORBA::SystemException::_tao_minor_code ( \ - TAO::VMCID, \ - EFAULT), \ - CORBA::COMPLETED_NO), \ - result); \ + throw FAULT_CODE ( + \CORBA::SystemException::_tao_minor_code ( + \TAO::VMCID, + \EFAULT), + \CORBA::COMPLETED_NO); \ } else ; diff --git a/TAO/orbsvcs/tests/FT_App/StubFaultNotifier.cpp b/TAO/orbsvcs/tests/FT_App/StubFaultNotifier.cpp index 49f629c8040..c121257c59f 100644 --- a/TAO/orbsvcs/tests/FT_App/StubFaultNotifier.cpp +++ b/TAO/orbsvcs/tests/FT_App/StubFaultNotifier.cpp @@ -380,7 +380,7 @@ void StubFaultNotifier::push_sequence_fault ( )) { ACE_UNUSED_ARG (constraint_grammar); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT(), 0); + throw CORBA::NO_IMPLEMENT(); return 0; } @@ -396,7 +396,7 @@ FT::FaultNotifier::ConsumerId StubFaultNotifier::connect_structured_fault_consum ACE_UNUSED_ARG(push_consumer); ACE_UNUSED_ARG(filter); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT(), 0); + throw CORBA::NO_IMPLEMENT(); return 0; } @@ -412,7 +412,7 @@ FT::FaultNotifier::ConsumerId StubFaultNotifier::connect_sequence_fault_consumer ACE_UNUSED_ARG(push_consumer); ACE_UNUSED_ARG(filter); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT(), 0); + throw CORBA::NO_IMPLEMENT(); return 0; } diff --git a/TAO/orbsvcs/tests/HTIOP/AMI/ami_test_i.cpp b/TAO/orbsvcs/tests/HTIOP/AMI/ami_test_i.cpp index 4732914e80b..d08b2f33c52 100644 --- a/TAO/orbsvcs/tests/HTIOP/AMI/ami_test_i.cpp +++ b/TAO/orbsvcs/tests/HTIOP/AMI/ami_test_i.cpp @@ -48,7 +48,7 @@ AMI_Test_i::foo (CORBA::Long_out out_l, { ACE_DEBUG ((LM_DEBUG, "Throwing Exception: A::DidTheRightThing\n")); - ACE_THROW_RETURN (A::DidTheRightThing(), 0); + throw A::DidTheRightThing(); } return 931234; diff --git a/TAO/orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/Factory.cpp b/TAO/orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/Factory.cpp index 988512a3743..80adbc78677 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/Factory.cpp +++ b/TAO/orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/Factory.cpp @@ -40,8 +40,7 @@ Factory::create_object ( { this->fcid_++; if (this->fcid_ == tmp_fcid) - ACE_THROW_RETURN (PortableGroup::ObjectNotCreated (), - CORBA::Object::_nil ()); + throw PortableGroup::ObjectNotCreated (); } tmp_fcid = this->fcid_; diff --git a/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_Filter.cpp b/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_Filter.cpp index 640f8cfd8c6..ed23bf0e963 100644 --- a/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_Filter.cpp +++ b/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_Filter.cpp @@ -138,8 +138,7 @@ TAO_Notify_Tests_RT_Test_Filter::match (const CORBA::Any & /*filterable_data */ ACE_THROW_SPEC ((CORBA::SystemException, CosNotifyFilter::UnsupportedFilterableData)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } CORBA::Boolean @@ -245,8 +244,7 @@ TAO_Notify_Tests_RT_Test_Filter::match_typed ( ACE_THROW_SPEC (( CORBA::SystemException, CosNotifyFilter::UnsupportedFilterableData)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } CosNotifyFilter::CallbackID @@ -255,8 +253,7 @@ TAO_Notify_Tests_RT_Test_Filter::attach_callback ( ) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } void @@ -273,6 +270,5 @@ CosNotifyFilter::CallbackIDSeq * TAO_Notify_Tests_RT_Test_Filter::get_callbacks (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - 0); + throw CORBA::NO_IMPLEMENT (); } diff --git a/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_FilterFactory.cpp b/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_FilterFactory.cpp index f3afd4cf533..c272f58f359 100644 --- a/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_FilterFactory.cpp +++ b/TAO/orbsvcs/tests/Notify/Test_Filter/RT_Test_FilterFactory.cpp @@ -40,7 +40,7 @@ TAO_Notify_Tests_RT_Test_FilterFactory::create_filter (const char *constraint_gr if (ACE_OS::strcmp (constraint_grammar, "TCL") != 0 && ACE_OS::strcmp (constraint_grammar, "ETCL") != 0 && ACE_OS::strcmp (constraint_grammar, "EXTENDED_TCL") != 0) - ACE_THROW_RETURN (CosNotifyFilter::InvalidGrammar (), 0); + throw CosNotifyFilter::InvalidGrammar (); // Create the RefCounted servant. @@ -70,7 +70,7 @@ TAO_Notify_Tests_RT_Test_FilterFactory::create_mapping_filter (const char * /*co CosNotifyFilter::InvalidGrammar )) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CosNotifyFilter::MappingFilter::_nil ()); + throw CORBA::NO_IMPLEMENT (); } ACE_FACTORY_DEFINE (TAO_RT_Test_Filter, TAO_Notify_Tests_RT_Test_FilterFactory) diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp index a8839f31939..485aea870d1 100644 --- a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp +++ b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.cpp @@ -37,7 +37,7 @@ AppHelper::create_poa(const char* name, { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to create child POA: %s.\n", name)); - ACE_THROW_RETURN (TestAppException(), PortableServer::POA::_nil ()); + throw TestAppException(); } return child_poa._retn(); @@ -59,7 +59,7 @@ AppHelper::activate_servant(PortableServer::POA_ptr poa, { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert servant_to_ref.\n")); - ACE_THROW_RETURN (TestAppException(), CORBA::Object::_nil ()); + throw TestAppException(); } return obj._retn(); diff --git a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h index e170ddf75e2..c3b16fabdfa 100644 --- a/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h +++ b/TAO/performance-tests/CSD_Strategy/TestInf/AppHelper.h @@ -25,7 +25,7 @@ struct RefHelper { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } T_var t_obj = T::_narrow(obj.in()); @@ -34,7 +34,7 @@ struct RefHelper { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to T interface.\n")); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } return t_obj._retn(); @@ -51,7 +51,7 @@ struct RefHelper ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for '%s'.\n", name)); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } T_var t_obj = T::_narrow(obj.in()); @@ -62,7 +62,7 @@ struct RefHelper ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow resolved initial ref '%s'.\n", name)); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } return t_obj._retn(); diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 75cf8ced421..6fee20f5bc2 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -117,7 +117,7 @@ namespace TAO // before we leave. if (s == TAO_INVOKE_RESTART) { - const Invocation_Status tmp = this->receive_other_interception (); + Invocation_Status const tmp = this->receive_other_interception (); if (tmp != TAO_INVOKE_SUCCESS) s = tmp; @@ -230,7 +230,7 @@ namespace TAO * exception. Success alone is returned through the return value. */ - const int reply_error = + int const reply_error = this->resolver_.transport ()->wait_strategy ()->wait (max_wait_time, rd); if (TAO_debug_level > 0 && max_wait_time != 0) @@ -311,8 +311,7 @@ namespace TAO } Invocation_Status - Synch_Twoway_Invocation::check_reply_status (TAO_Synch_Reply_Dispatcher &rd - ) + Synch_Twoway_Invocation::check_reply_status (TAO_Synch_Reply_Dispatcher &rd) { /* * Precondition: We probably got a reply. <ACE_Thread::self> is @@ -510,8 +509,7 @@ namespace TAO CORBA::ULong minor = 0; CORBA::ULong completion = 0; - if ((cdr >> minor) == 0 - || (cdr >> completion) == 0) + if ((cdr >> minor) == 0 || (cdr >> completion) == 0) { throw ::CORBA::MARSHAL (0, CORBA::COMPLETED_MAYBE); } @@ -520,7 +518,7 @@ namespace TAO // // Note that we are careful to retain "at most once" semantics. if ((ACE_OS_String::strcmp (type_id.in (), - "IDL:omg.org/CORBA/TRANSIENT:1.0") == 0 || + "IDL:omg.org/CORBA/TRANSIENT:1.0") == 0 || ACE_OS_String::strcmp (type_id.in (), "IDL:omg.org/CORBA/OBJ_ADAPTER:1.0") == 0 || ACE_OS_String::strcmp (type_id.in (), diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp index afa14627a05..85d89087e1d 100644 --- a/TAO/tao/Synch_Queued_Message.cpp +++ b/TAO/tao/Synch_Queued_Message.cpp @@ -135,15 +135,6 @@ TAO_Synch_Queued_Message::clone (ACE_Allocator *alloc) } else { - // No allocator, so use the common heap! - if (TAO_debug_level == 4) - { - // This debug is for testing purposes! - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Synch_Queued_Message::clone\n" - "Using global pool for allocation \n")); - } - ACE_NEW_RETURN (qm, TAO_Synch_Queued_Message (mb, this->orb_core_, 0, 0), 0); diff --git a/TAO/tao/SystemException.cpp b/TAO/tao/SystemException.cpp index 9e03e639281..acf91be1416 100644 --- a/TAO/tao/SystemException.cpp +++ b/TAO/tao/SystemException.cpp @@ -110,8 +110,7 @@ CORBA::SystemException::operator= (const CORBA::SystemException &src) } void -CORBA::SystemException::_tao_encode (TAO_OutputCDR &cdr - ) const +CORBA::SystemException::_tao_encode (TAO_OutputCDR &cdr) const { if (cdr.write_string (this->_rep_id ()) && cdr.write_ulong (this->minor ()) @@ -124,8 +123,7 @@ CORBA::SystemException::_tao_encode (TAO_OutputCDR &cdr } void -CORBA::SystemException::_tao_decode (TAO_InputCDR &cdr - ) +CORBA::SystemException::_tao_decode (TAO_InputCDR &cdr) { // The string is read by the caller, to determine the exact type of // the exception. We just decode the fields... @@ -210,8 +208,7 @@ CORBA::SystemException::_tao_duplicate (void) const } CORBA::ULong -CORBA::SystemException::_tao_minor_code (u_int location, - int errno_value) +CORBA::SystemException::_tao_minor_code (u_int location, int errno_value) { return TAO::VMCID diff --git a/TAO/tao/SystemException.h b/TAO/tao/SystemException.h index 7c2c999804d..b1da978276e 100644 --- a/TAO/tao/SystemException.h +++ b/TAO/tao/SystemException.h @@ -120,15 +120,12 @@ namespace CORBA /// function is not CORBA compliant. virtual ACE_CString _info (void) const; - virtual void _tao_encode (TAO_OutputCDR &cdr - ) const; + virtual void _tao_encode (TAO_OutputCDR &cdr) const; - virtual void _tao_decode (TAO_InputCDR &cdr - ); + virtual void _tao_decode (TAO_InputCDR &cdr); /// Helper to create a minor status value. - static CORBA::ULong _tao_minor_code (u_int location, - int errno_value); + static CORBA::ULong _tao_minor_code (u_int location, int errno_value); /// Helper to translate a platform-specific errno to a TAO errno /// value. @@ -146,8 +143,7 @@ namespace CORBA SystemException & operator= (const SystemException &src); /// Constructor using a repository id. - SystemException (CORBA::ULong code, - CORBA::CompletionStatus completed); + SystemException (CORBA::ULong code, CORBA::CompletionStatus completed); /// Constructor using a repository id. SystemException (const char *repository_id, @@ -158,8 +154,7 @@ namespace CORBA /// Return the exception description associated with the given OMG /// minor code. static const char *_tao_get_omg_exception_description ( - const CORBA::SystemException &exc, - CORBA::ULong minor_code); + const CORBA::SystemException &exc, CORBA::ULong minor_code); private: /// Minor code. @@ -167,7 +162,6 @@ namespace CORBA /// Completion status. CORBA::CompletionStatus completed_; - }; // Declarations for all of the CORBA standard exceptions. diff --git a/TAO/tests/AMI/ami_test_i.cpp b/TAO/tests/AMI/ami_test_i.cpp index cc30da0f035..bfa216d5958 100644 --- a/TAO/tests/AMI/ami_test_i.cpp +++ b/TAO/tests/AMI/ami_test_i.cpp @@ -45,7 +45,7 @@ AMI_Test_i::foo (CORBA::Long_out out_l, { ACE_DEBUG ((LM_DEBUG, "Throwing Exception: A::DidTheRightThing\n")); - ACE_THROW_RETURN (A::DidTheRightThing(), 0); + throw A::DidTheRightThing(); } return 931234; diff --git a/TAO/tests/Abstract_Interface/test_i.cpp b/TAO/tests/Abstract_Interface/test_i.cpp index b7dbaa3b445..9eea47d82b6 100644 --- a/TAO/tests/Abstract_Interface/test_i.cpp +++ b/TAO/tests/Abstract_Interface/test_i.cpp @@ -24,8 +24,7 @@ foo_i::foo_op (const char * inarg) } else { - ACE_THROW_RETURN (BadInput ("expected \"foo_op\"\n"), - retval._retn ()); + throw BadInput ("expected \"foo_op\"\n"); } return retval._retn (); @@ -46,8 +45,7 @@ foo_i::base_op (const char * inarg) } else { - ACE_THROW_RETURN (BadInput ("expected \"base_op\"\n"), - retval._retn ()); + throw BadInput ("expected \"base_op\"\n"); } return retval._retn (); diff --git a/TAO/tests/Bug_2234_Regression/server.cpp b/TAO/tests/Bug_2234_Regression/server.cpp index fd550b9b327..0d50549b028 100644 --- a/TAO/tests/Bug_2234_Regression/server.cpp +++ b/TAO/tests/Bug_2234_Regression/server.cpp @@ -48,12 +48,12 @@ public: if (static_cast<CORBA::Long>( 1 ) != a) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 3 ) != c) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } b= static_cast<CORBA::Long>( a << 1 ); @@ -75,32 +75,32 @@ public: if (0 == a) { ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (1 != ACE_OS::strlen( a )) { ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if ('1' != *a) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (1 != ACE_OS::strlen( c )) { ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (0 == c) { ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if ('3' != *c) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } b= CORBA::string_dup( "0" ); // Create a one character output buffer @@ -125,12 +125,12 @@ public: if (static_cast<CORBA::Long>( 1 ) != a.val) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 3 ) != c.val) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } newret.val= static_cast<CORBA::Long>( 7 ); @@ -160,32 +160,32 @@ public: if (0 == a.val.in()) { ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (1 != ACE_OS::strlen( a.val.in() )) { ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if ('1' != *a.val.in()) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (0 == c.val.in()) { ACE_DEBUG( (LM_INFO, "* Incorrect NULL string given for parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (1 != ACE_OS::strlen( c.val.in() )) { ACE_DEBUG( (LM_INFO, "* Incorrect string length for parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if ('3' != *c.val.in()) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } char ca[2]= {0}; @@ -227,22 +227,22 @@ public: if (static_cast<CORBA::Short>( 1 ) != a._d()) { ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 1 ) != a.valLong()) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Short>( 1 ) != c._d()) { ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 3 ) != c.valLong()) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), newret ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } Test::MyNonVarUnion *newval_p; @@ -272,22 +272,22 @@ public: if (static_cast<CORBA::Short>( 1 ) != a._d()) { ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 1 ) != a.valLong()) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Short>( 1 ) != c._d()) { ACE_DEBUG( (LM_INFO, "* Incorrect type of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 3 ) != c.valLong()) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } Test::MyVarUnion *newval_p; @@ -322,22 +322,22 @@ public: if (1u != a.length()) { ACE_DEBUG( (LM_INFO, "* Incorrect length of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 1 ) != a[0]) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (1u != c.length()) { ACE_DEBUG( (LM_INFO, "* Incorrect length of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (static_cast<CORBA::Long>( 3 ) != c[0]) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } Test::MySeqOfLong *newval_p; @@ -377,26 +377,26 @@ public: if (static_cast<CORBA::Long>( 1 ) != aL) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } } else { ACE_DEBUG( (LM_INFO, "* Incorrect any type for parameter a\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } if (c >>= cL) { if (static_cast<CORBA::Long>( 3 ) != cL) { ACE_DEBUG( (LM_INFO, "* Incorrect input value of parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } } else { ACE_DEBUG( (LM_INFO, "* Incorrect any type for parameter c\n") ); - ACE_THROW_RETURN( CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO), 0 ); + throw CORBA::BAD_PARAM(0, CORBA::COMPLETED_NO); } CORBA::Any *newval_p; diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp index 8ad2666efe5..2cddb374de7 100644 --- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp +++ b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.cpp @@ -37,7 +37,7 @@ AppHelper::create_poa(const char* name, { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to create child POA: %s.\n", name)); - ACE_THROW_RETURN (TestAppException(), PortableServer::POA::_nil ()); + throw TestAppException(); } return child_poa._retn(); @@ -59,7 +59,7 @@ AppHelper::activate_servant(PortableServer::POA_ptr poa, { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert servant_to_ref.\n")); - ACE_THROW_RETURN (TestAppException(), CORBA::Object::_nil ()); + throw TestAppException(); } return obj._retn(); diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h index 70d58382e05..b94f5605d23 100644 --- a/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h +++ b/TAO/tests/CSD_Strategy_Tests/TP_Common/AppHelper.h @@ -25,7 +25,7 @@ struct RefHelper { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to convert IOR string to obj ref.\n")); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } T_var t_obj = T::_narrow(obj.in()); @@ -34,7 +34,7 @@ struct RefHelper { ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow obj ref to T interface.\n")); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } return t_obj._retn(); @@ -51,7 +51,7 @@ struct RefHelper ACE_ERROR((LM_ERROR, "(%P|%t) Failed to resolve initial ref for '%s'.\n", name)); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } T_var t_obj = T::_narrow(obj.in()); @@ -62,7 +62,7 @@ struct RefHelper ACE_ERROR((LM_ERROR, "(%P|%t) Failed to narrow resolved initial ref '%s'.\n", name)); - ACE_THROW_RETURN (TestAppException(), T::_nil ()); + throw TestAppException(); } return t_obj._retn(); diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp index 7c65455a471..7e009e52230 100644 --- a/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp +++ b/TAO/tests/CSD_Strategy_Tests/TP_Foo_C/Foo_C_cust_op3.cpp @@ -44,7 +44,7 @@ Foo_C_cust_op3::result(void) { if (this->cancelled_) { - ACE_THROW_RETURN (CancelledException(), -1); + throw CancelledException(); } return this->result_; diff --git a/TAO/tests/Client_Leaks/Process_Factory.cpp b/TAO/tests/Client_Leaks/Process_Factory.cpp index e4ab9cf4544..5ede5f6bae5 100644 --- a/TAO/tests/Client_Leaks/Process_Factory.cpp +++ b/TAO/tests/Client_Leaks/Process_Factory.cpp @@ -57,7 +57,7 @@ Process_Factory::create_new_process (void) "(%P|%t) Process_Factory::create_new_process, " " spawn call failed (%d)\n", errno)); - ACE_THROW_RETURN (Test::Spawn_Failed (), Test::Process::_nil ()); + throw Test::Spawn_Failed (); } int process_has_started = 0; @@ -89,7 +89,7 @@ Process_Factory::create_new_process (void) "(%P|%t) Process_Factory::create_new_process, " " timeout while waiting for child\n")); (void) child_process.terminate (); - ACE_THROW_RETURN (Test::Spawn_Failed (), Test::Process::_nil ()); + throw Test::Spawn_Failed (); } return the_process._retn (); diff --git a/TAO/tests/File_IO/File_i.cpp b/TAO/tests/File_IO/File_i.cpp index 3622604315c..557108e95e6 100644 --- a/TAO/tests/File_IO/File_i.cpp +++ b/TAO/tests/File_IO/File_i.cpp @@ -54,7 +54,7 @@ FileImpl::System::open (const char *file_name, if (file_descriptor == ACE_INVALID_HANDLE) { - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); } char file_descriptor_buffer[BUFSIZ]; @@ -164,7 +164,7 @@ FileImpl::Descriptor::write (const File::Descriptor::DataBuffer &buffer) if (len > 0) return len; - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); } File::Descriptor::DataBuffer * @@ -184,7 +184,7 @@ FileImpl::Descriptor::read (CORBA::Long num_bytes) 1); File::Descriptor::DataBuffer::freebuf (buffer); - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); } CORBA::ULong @@ -199,7 +199,7 @@ FileImpl::Descriptor::lseek (CORBA::ULong offset, offset, whence); if (result == -1) - ACE_THROW_RETURN (File::IOError (), 0); + throw File::IOError (); return (CORBA::ULong) result; } diff --git a/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp b/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp index 80edf3be437..088b4727644 100644 --- a/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp +++ b/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp @@ -54,7 +54,7 @@ Servant_Locator::preinvoke (const PortableServer::ObjectId &oid, "The OID is <%s> \n", s.in ())); if (ACE_OS::strstr (s.in (), "Simple_Server") == 0) { - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); + throw CORBA::OBJECT_NOT_EXIST (); } // Combined IOR stuff @@ -67,9 +67,9 @@ Servant_Locator::preinvoke (const PortableServer::ObjectId &oid, ACE_DEBUG ((LM_DEBUG, "About to throw exception.. \n")); - ACE_THROW_RETURN (PortableServer::ForwardRequest ( - CORBA::Object::_duplicate (server.in ())), - 0); + throw PortableServer::ForwardRequest ( + CORBA::Object::_duplicate ( + server.in ())); } diff --git a/TAO/tests/MT_BiDir/Sender_i.cpp b/TAO/tests/MT_BiDir/Sender_i.cpp index 712a2edfaf3..2592d82d4d9 100644 --- a/TAO/tests/MT_BiDir/Sender_i.cpp +++ b/TAO/tests/MT_BiDir/Sender_i.cpp @@ -38,8 +38,7 @@ Sender_i::receiver_object (Receiver_ptr recv) this->mutex_,-1); if (this->no_clients_ == this->last_index_) - ACE_THROW_RETURN (Sender::Table_Full (), - -1); + throw Sender::Table_Full (); this->receivers_[this->last_index_] = Receiver::_duplicate (recv); diff --git a/TAO/tests/OctetSeq/test_i.cpp b/TAO/tests/OctetSeq/test_i.cpp index c7ba1fd796d..dd1e42054e4 100644 --- a/TAO/tests/OctetSeq/test_i.cpp +++ b/TAO/tests/OctetSeq/test_i.cpp @@ -48,7 +48,7 @@ Database_i::get (Test::Index i) ACE_THROW_SPEC ((CORBA::SystemException,Test::OutOfRange)) { if (i >= this->max_range_) - ACE_THROW_RETURN (Test::OutOfRange (0, this->max_range_), 0); + throw Test::OutOfRange (0, this->max_range_); Test::OctetSeq* copy; ACE_NEW_THROW_EX (copy, @@ -62,7 +62,7 @@ Database_i::get_crc (Test::Index i) ACE_THROW_SPEC ((CORBA::SystemException,Test::OutOfRange)) { if (i >= this->max_range_) - ACE_THROW_RETURN (Test::OutOfRange (0, this->max_range_), 0); + throw Test::OutOfRange (0, this->max_range_); return ACE::crc32 (this->elements_[i].get_buffer (), this->elements_[i].length ()); diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp index 3ab158d6599..c7fa1976fc1 100644 --- a/TAO/tests/Param_Test/param_test_i.cpp +++ b/TAO/tests/Param_Test/param_test_i.cpp @@ -944,13 +944,13 @@ Param_Test_i::test_exception (CORBA::ULong s1, // Throw a known user exception type to test the user exception. else if (d == 1) { - ACE_THROW_RETURN (Param_Test::Ooops (" % 4 == 1", d), 0); + throw Param_Test::Ooops (" % 4 == 1", d); } // Throw a CORBA::SystemException type CORBA::NO_MEMORY to test // the system exception. else if (d == 2) { - ACE_THROW_RETURN (CORBA::NO_MEMORY (), 0); + throw CORBA::NO_MEMORY (); } // This will avoid the compiler diff --git a/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp b/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp index 6164f1d6270..4c487d1fe64 100644 --- a/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp +++ b/TAO/tests/Portable_Interceptors/PolicyFactory/PolicyFactory.cpp @@ -17,13 +17,11 @@ PolicyFactory::create_policy (CORBA::PolicyType type, // Sanity check since this condition should be caught earlier by the // TAO_PolicyFactory_Registry. if (type != Test::POLICY_TYPE) - ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), - CORBA::Policy::_nil ()); + throw CORBA::PolicyError (CORBA::BAD_POLICY_TYPE); CORBA::ULong val; if (!(value >>= val)) - ACE_THROW_RETURN (CORBA::INTERNAL (), - CORBA::Policy::_nil ()); + throw CORBA::INTERNAL (); Policy * p = 0; ACE_NEW_THROW_EX (p, diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp index a517bd7deeb..919ef94751d 100644 --- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp +++ b/TAO/tests/Smart_Proxies/On_Demand/server.cpp @@ -54,8 +54,7 @@ Test_i :: method (CORBA::Short boo) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test_i::method () invoked\n"))); if (boo == 5) - ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"), - -1); + throw Test::Oops ("Invalid boo\n"); return 0; } diff --git a/TAO/tests/Smart_Proxies/Policy/server.cpp b/TAO/tests/Smart_Proxies/Policy/server.cpp index 66f7a13e3d0..3246d5a2919 100644 --- a/TAO/tests/Smart_Proxies/Policy/server.cpp +++ b/TAO/tests/Smart_Proxies/Policy/server.cpp @@ -54,8 +54,7 @@ Test_i :: method (CORBA::Short boo) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test_i::method () invoked\n"))); if (boo == 5) - ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"), - -1); + throw Test::Oops ("Invalid boo\n"); return 0; } diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp index f1a83fa6b95..44fe62a987c 100644 --- a/TAO/tests/Smart_Proxies/server.cpp +++ b/TAO/tests/Smart_Proxies/server.cpp @@ -54,8 +54,7 @@ Test_i :: method (CORBA::Short boo) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test_i::method () invoked\n"))); if (boo == 5) - ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"), - -1); + throw Test::Oops ("Invalid boo\n"); return 0; } diff --git a/TAO/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp index da693a78d17..757d6743fd1 100644 --- a/TAO/utils/catior/catior.cpp +++ b/TAO/utils/catior/catior.cpp @@ -85,7 +85,7 @@ catiiop (char* string) if (cp == 0) { - ACE_THROW_RETURN (CORBA::DATA_CONVERSION (), 0); + throw CORBA::DATA_CONVERSION (); } CORBA::String_var hostname = CORBA::string_alloc (1 + cp - string); @@ -102,7 +102,7 @@ catiiop (char* string) if (cp == 0) { - ACE_THROW_RETURN (CORBA::DATA_CONVERSION (), 0); + throw CORBA::DATA_CONVERSION (); } port_number = (short) ACE_OS::atoi ((char *) string); @@ -354,7 +354,7 @@ catpoop (char* string) if (cp == 0) { - ACE_THROW_RETURN (CORBA::DATA_CONVERSION (), 0); + throw CORBA::DATA_CONVERSION (); } // Read the hostname. |