diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/AMH/Sink_Server/client.cpp | 28 | ||||
-rw-r--r-- | examples/Event_Comm/supplier.cpp | 23 | ||||
-rw-r--r-- | examples/Persistent_Grid/Grid_i.h | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | examples/RTCORBA/Activity/svc.conf.client | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | examples/RTCORBA/Activity/svc.conf.server | 0 | ||||
-rw-r--r-- | examples/Simple/bank/AccountManager_i.h | 3 | ||||
-rw-r--r-- | examples/Simple/bank/server.cpp | 5 | ||||
-rw-r--r-- | examples/Simple/echo/Echo_i.h | 5 | ||||
-rw-r--r-- | examples/Simple/echo/server.cpp | 5 | ||||
-rw-r--r-- | examples/Simple/grid/Grid_i.h | 3 | ||||
-rw-r--r-- | examples/Simple/grid/server.cpp | 5 | ||||
-rw-r--r-- | examples/Simple/time/Time_i.h | 3 | ||||
-rw-r--r-- | examples/Simple/time/server.cpp | 5 |
13 files changed, 61 insertions, 34 deletions
diff --git a/examples/AMH/Sink_Server/client.cpp b/examples/AMH/Sink_Server/client.cpp index 3b8f5af6824..c5d6a00e3f5 100644 --- a/examples/AMH/Sink_Server/client.cpp +++ b/examples/AMH/Sink_Server/client.cpp @@ -7,24 +7,30 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - Client_Task task (argc, argv); + Client_Task task (argc, argv); - if (task.parse_args () != 1) - { + if (task.parse_args () != 1) + { + ACE_OS::exit (1); + } - ACE_OS::exit (1); - } + task.try_RT_scheduling (); - task.try_RT_scheduling (); + if (task.narrow_servant (orb.in()) != 1) + { + ACE_OS::exit (1); + } - if (task.narrow_servant (orb.in()) != 1) + task.run_test(); + } + catch (const ::CORBA::Exception &ex) { - ACE_OS::exit (1); + ex._tao_print_exception ("ERROR : Unexpected CORBA exception caugth :"); } - task.run_test(); - return 0; } diff --git a/examples/Event_Comm/supplier.cpp b/examples/Event_Comm/supplier.cpp index 7991b1e4631..97431ab7973 100644 --- a/examples/Event_Comm/supplier.cpp +++ b/examples/Event_Comm/supplier.cpp @@ -70,14 +70,23 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Initialize server daemon. Supplier supplier; - if (supplier.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "supplier init failed"), - 1); + try + { + + if (supplier.init (argc, argv) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "supplier init failed"), + 1); - // Loop forever handling events. - supplier.run (); + // Loop forever handling events. + supplier.run (); + } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("Caught unexpected CORBA exception : "); + return 1; + } return 0; } diff --git a/examples/Persistent_Grid/Grid_i.h b/examples/Persistent_Grid/Grid_i.h index 31c3a766303..9a52fa905a3 100644 --- a/examples/Persistent_Grid/Grid_i.h +++ b/examples/Persistent_Grid/Grid_i.h @@ -66,8 +66,7 @@ private: /// Hold the pool of name pool_name_ pool_t *pool_t_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const Grid_Factory_i &)) + void operator= (const Grid_Factory_i &); }; @@ -86,11 +85,8 @@ public: /// Constructor Grid_i (void); - Grid_i (CORBA::Short, - CORBA::Short, - pool_t *); - - // Constructor. + /// Constructor. + Grid_i (CORBA::Short, CORBA::Short, pool_t *); /// Destructor ~Grid_i (void); diff --git a/examples/RTCORBA/Activity/svc.conf.client b/examples/RTCORBA/Activity/svc.conf.client index 89ae701d721..89ae701d721 100755..100644 --- a/examples/RTCORBA/Activity/svc.conf.client +++ b/examples/RTCORBA/Activity/svc.conf.client diff --git a/examples/RTCORBA/Activity/svc.conf.server b/examples/RTCORBA/Activity/svc.conf.server index 20de7d0b1d7..20de7d0b1d7 100755..100644 --- a/examples/RTCORBA/Activity/svc.conf.server +++ b/examples/RTCORBA/Activity/svc.conf.server diff --git a/examples/Simple/bank/AccountManager_i.h b/examples/Simple/bank/AccountManager_i.h index ede279c0840..ee2806ccc04 100644 --- a/examples/Simple/bank/AccountManager_i.h +++ b/examples/Simple/bank/AccountManager_i.h @@ -96,8 +96,7 @@ private: */ MAP_MANAGER_TYPE hash_map_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const AccountManager_i &)) + void operator= (const AccountManager_i &); }; #endif /* ACCOUNTMANAGER_I_H */ diff --git a/examples/Simple/bank/server.cpp b/examples/Simple/bank/server.cpp index a1c4987a0dc..63cd167bf87 100644 --- a/examples/Simple/bank/server.cpp +++ b/examples/Simple/bank/server.cpp @@ -32,6 +32,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception"); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception"); + return 1; + } return 0; } diff --git a/examples/Simple/echo/Echo_i.h b/examples/Simple/echo/Echo_i.h index 5afd29de0b1..6211b8ed499 100644 --- a/examples/Simple/echo/Echo_i.h +++ b/examples/Simple/echo/Echo_i.h @@ -24,7 +24,7 @@ * * @brief Echo Object Implementation * - * The object implementation performs teh following functions: + * The object implementation performs the following functions: * -- To return the string which needs to be displayed * from the server. * -- shuts down the server @@ -55,8 +55,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++ 2.7.2 happy.. - ACE_UNIMPLEMENTED_FUNC (void operator= (const Echo_i&)) + void operator= (const Echo_i&); }; #endif /* ECHO_I_H */ diff --git a/examples/Simple/echo/server.cpp b/examples/Simple/echo/server.cpp index 2b8786e5cc2..4c9ab20ae95 100644 --- a/examples/Simple/echo/server.cpp +++ b/examples/Simple/echo/server.cpp @@ -33,6 +33,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception"); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception"); + return 1; + } return 0; } diff --git a/examples/Simple/grid/Grid_i.h b/examples/Simple/grid/Grid_i.h index 72166422d8a..7b9f581735a 100644 --- a/examples/Simple/grid/Grid_i.h +++ b/examples/Simple/grid/Grid_i.h @@ -116,8 +116,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const Grid_Factory_i &)) + void operator= (const Grid_Factory_i &); }; #endif /* GRID_I_H */ diff --git a/examples/Simple/grid/server.cpp b/examples/Simple/grid/server.cpp index e627e46fc7e..ed349bf0ecd 100644 --- a/examples/Simple/grid/server.cpp +++ b/examples/Simple/grid/server.cpp @@ -35,6 +35,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception in main "); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception in main"); + return 1; + } return 0; } diff --git a/examples/Simple/time/Time_i.h b/examples/Simple/time/Time_i.h index 2260d52a185..d97c0937fa0 100644 --- a/examples/Simple/time/Time_i.h +++ b/examples/Simple/time/Time_i.h @@ -51,8 +51,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const Time_i &)) + void operator= (const Time_i &); }; #endif /* TIME_I_H */ diff --git a/examples/Simple/time/server.cpp b/examples/Simple/time/server.cpp index ac8368fbdbf..7a19abd727f 100644 --- a/examples/Simple/time/server.cpp +++ b/examples/Simple/time/server.cpp @@ -33,6 +33,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception in main"); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception in main"); + return 1; + } return 0; } |