diff options
author | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-29 02:42:50 +0000 |
---|---|---|
committer | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-29 02:42:50 +0000 |
commit | 372e0c8414b880d6d0513e1d541a35dbeedc79ef (patch) | |
tree | 81347e2680c855da988b73875fd26d09389f721b /TAO/orbsvcs | |
parent | d5e55d3c698542fa4228ae65b3551edc84b63282 (diff) | |
download | ATCD-372e0c8414b880d6d0513e1d541a35dbeedc79ef.tar.gz |
fixed exception problems
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r-- | TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp | 32 | ||||
-rw-r--r-- | TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp | 42 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp | 42 |
3 files changed, 58 insertions, 58 deletions
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp index 19c24641ebb..fb577f93764 100644 --- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp +++ b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp @@ -14,12 +14,12 @@ ACE_RCSID(Dump_Schedule, Dump_Schedule, "$Id$") int main (int argc, char *argv[]) { - TAO_TRY + ACE_TRY_NEW_ENV { // Initialize ORB. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; + CORBA::ORB_init (argc, argv, "internet", ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); @@ -29,12 +29,12 @@ main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; + PortableServer::POA::_narrow (poa_object.in(), ACE_TRY_ENV); + ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; + root_poa->the_POAManager (ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); @@ -44,8 +44,8 @@ main (int argc, char *argv[]) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; + CosNaming::NamingContext::_narrow (naming_obj.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; const char *name = 0; if (argc > 1) @@ -77,28 +77,28 @@ main (int argc, char *argv[]) ACE_SCOPE_THREAD), ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), - infos_out, configs_out, anomalies_out, TAO_TRY_ENV); + infos_out, configs_out, anomalies_out, ACE_TRY_ENV); #else /* ! __SUNPRO_CC */ ACE_Scheduler_Factory::server ()->compute_scheduling (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), - infos.out (), configs.out (), anomalies.out (), TAO_TRY_ENV); + infos.out (), configs.out (), anomalies.out (), ACE_TRY_ENV); #endif /* ! __SUNPRO_CC */ - TAO_CHECK_ENV; + ACE_TRY_CHECK; - ACE_Scheduler_Factory::dump_schedule (infos.in (), + ACE_Scheduler_Factory::dump_schedule (infos.in (), configs.in (), anomalies.in (), "Scheduler_Runtime.cpp"); } - TAO_CATCH (CORBA::SystemException, sys_ex) + ACE_CATCHANY { - TAO_TRY_ENV.print_exception ("SYS_EX"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Dump_Schedule"); } - TAO_ENDTRY; + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp index 096e0b13227..151cf5693f4 100644 --- a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp +++ b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.cpp @@ -44,12 +44,12 @@ parse_args (int argc, char *argv []) int main (int argc, char *argv[]) { - TAO_TRY + ACE_TRY_NEW_ENV { // Initialize ORB. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; + CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -62,12 +62,12 @@ int main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; + PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; + root_poa->the_POAManager (ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); @@ -77,20 +77,20 @@ int main (int argc, char *argv[]) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; + CosNaming::NamingContext::_narrow (naming_obj.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; // Create an Scheduling service servant... ACE_Config_Scheduler scheduler_impl; - TAO_CHECK_ENV; + ACE_TRY_CHECK; RtecScheduler::Scheduler_var scheduler = - scheduler_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; + scheduler_impl._this (ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::String_var str = - orb->object_to_string (scheduler.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; + orb->object_to_string (scheduler.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "The scheduler IOR is <%s>\n", str.in ())); @@ -98,22 +98,22 @@ int main (int argc, char *argv[]) CosNaming::Name schedule_name (1); schedule_name.length (1); schedule_name[0].id = CORBA::string_dup (service_name); - naming_context->bind (schedule_name, scheduler.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; + naming_context->bind (schedule_name, scheduler.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; + poa_manager->activate (ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "%s; running scheduling service\n", __FILE__)); if (orb->run () == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); } - TAO_CATCHANY + ACE_CATCHANY { - TAO_TRY_ENV.print_exception ("schedule_service"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "schedule_service"); } - TAO_ENDTRY; + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp index 0eb5c1477ec..25e52c9c452 100644 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp @@ -15,11 +15,11 @@ ACE_RCSID(Sched_Conf, Sched_Conf, "$Id$") const char* service_name = "ScheduleService"; -const char* format_string = "{%-12s, %d, %d, %d, %d, %8d, " - "ACE_static_cast (RtecScheduler::Criticality_t, %d), " - "ACE_static_cast (RtecScheduler::Importance_t, %d), " - "%d, %d, %3d, %d, %d, " - "ACE_static_cast (RtecScheduler::Info_Type_t, %d)}\n"; +const char* format_string = " {%-12s, %d, %d, %d, %d, %8d, " + " ACE_static_cast (RtecScheduler::Criticality_t, %d), " + " ACE_static_cast (RtecScheduler::Importance_t, %d), " + " %d, %d, %3d, %d, %d, " + "ACE_static_cast (RtecScheduler::Info_Type_t, %d)}\n"; int parse_args (int argc, char *argv []) @@ -318,12 +318,12 @@ main (int argc, char *argv[]) }; - TAO_TRY + ACE_TRY_NEW_ENV { // Initialize ORB. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; + CORBA::ORB_init (argc, argv, "internet", ACE_TRY_ENV); + ACE_TRY_CHECK; CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); @@ -333,12 +333,12 @@ main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; + PortableServer::POA::_narrow (poa_object.in(), ACE_TRY_ENV); + ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; + root_poa->the_POAManager (ACE_TRY_ENV); + ACE_TRY_CHECK; // Initialize the naming services TAO_Naming_Client my_name_client; @@ -362,7 +362,7 @@ main (int argc, char *argv[]) // create the RT_Info config_infos[i].handle = ACE_Scheduler_Factory::server ()->create (config_infos[i].entry_point, - TAO_TRY_ENV); + ACE_TRY_ENV); // initialize the RT_Info ACE_Scheduler_Factory::server ()-> @@ -376,7 +376,7 @@ main (int argc, char *argv[]) config_infos[i].quantum, config_infos[i].threads, ACE_static_cast (RtecScheduler::Info_Type_t, config_infos[i].info_type), - TAO_TRY_ENV); + ACE_TRY_ENV); // make operations in second half dependant on // operations in the first half of the array, @@ -388,7 +388,7 @@ main (int argc, char *argv[]) config_infos[i - (operation_count / 2)].handle, 2, // number of calls RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); + ACE_TRY_ENV); } } @@ -415,17 +415,17 @@ main (int argc, char *argv[]) ACE_SCOPE_THREAD), ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), - infos_out, configs_out, anomalies_out, TAO_TRY_ENV); + infos_out, configs_out, anomalies_out, ACE_TRY_ENV); #else /* ! __SUNPRO_CC */ ACE_Scheduler_Factory::server ()->compute_scheduling (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, ACE_SCOPE_THREAD), - infos.out (), configs.out (), anomalies.out (), TAO_TRY_ENV); + infos.out (), configs.out (), anomalies.out (), ACE_TRY_ENV); #endif /* ! __SUNPRO_CC */ - TAO_CHECK_ENV; + ACE_TRY_CHECK; ACE_Scheduler_Factory::dump_schedule (infos.in (), configs.in (), @@ -433,11 +433,11 @@ main (int argc, char *argv[]) "Sched_Conf_Runtime.h", format_string); } - TAO_CATCH (CORBA::SystemException, sys_ex) + ACE_CATCHANY { - TAO_TRY_ENV.print_exception ("SYS_EX"); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX"); } - TAO_ENDTRY; + ACE_ENDTRY; return 0; } |