summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-08 17:34:06 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-08 17:34:06 +0000
commit19b2fef01a6d6b2df7e39d48aac2379804724a78 (patch)
treefecab0919db4257174b3fb7ca5a698a34112c80a
parenta1609b0b6ace8d86417bd9fcdd651c245e93dc39 (diff)
downloadATCD-19b2fef01a6d6b2df7e39d48aac2379804724a78.tar.gz
ChangeLogTag:Thu Mar 8 09:32:49 2001 Darrell Brunsch <brunsch@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a7
-rw-r--r--TAO/examples/Borland/ChatClientWnd.cpp67
-rw-r--r--TAO/examples/Callback_Quoter/Consumer_Handler.cpp3
3 files changed, 47 insertions, 30 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 8aa3ae7474b..74ddd5a33c0 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,10 @@
+Thu Mar 8 09:32:49 2001 Darrell Brunsch <brunsch@uci.edu>
+
+ * examples/Borland/ChatClientWnd.cpp:
+ * examples/Callback_Quoter/Consumer_Handler.cpp:
+
+ Fixed some resolve_initial_reference fuzz errors.
+
Thu Mar 8 11:01:45 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
* performance-tests/RTCorba/Oneways/Reliable/server.cpp:
diff --git a/TAO/examples/Borland/ChatClientWnd.cpp b/TAO/examples/Borland/ChatClientWnd.cpp
index eb6e9b76c00..8d8bf2f6052 100644
--- a/TAO/examples/Borland/ChatClientWnd.cpp
+++ b/TAO/examples/Borland/ChatClientWnd.cpp
@@ -14,47 +14,56 @@ __fastcall TChatClientWindow::TChatClientWindow (TComponent* Owner)
: TForm (Owner),
orb_thread_ (0)
{
- nickname_ = InputBox ("Enter Nickname",
- "Enter the nickname you would like to use:",
- "noname");
+ try
+ {
+ nickname_ = InputBox ("Enter Nickname",
+ "Enter the nickname you would like to use:",
+ "noname");
- if (!OpenDialog->Execute ())
- throw Exception ("IOR file not selected - unable to continue");
- ior_file_name_ = OpenDialog->FileName;
+ if (!OpenDialog->Execute ())
+ throw Exception ("IOR file not selected - unable to continue");
+ ior_file_name_ = OpenDialog->FileName;
- // Retrieve the ORB.
- orb_ = CORBA::ORB_init (_argc, _argv, 0);
+ // Retrieve the ORB.
+ orb_ = CORBA::ORB_init (_argc, _argv, 0);
- // Get reference to the Root POA
- CORBA::Object_var obj =
- orb_->resolve_initial_references ("RootPOA");
- PortableServer::POA_var poa = PortableServer::POA::_narrow (obj);
+ // Get reference to the Root POA
+ CORBA::Object_var obj =
+ orb_->resolve_initial_references ("RootPOA");
+ PortableServer::POA_var poa = PortableServer::POA::_narrow (obj);
- // Activate the POA manager
- PortableServer::POAManager_var mgr = poa->the_POAManager ();
- mgr->activate ();
+ // Activate the POA manager
+ PortableServer::POAManager_var mgr = poa->the_POAManager ();
+ mgr->activate ();
- // Run the orb in a separate thread
- orb_thread_.reset (new TORBThread (orb_));
+ // Run the orb in a separate thread
+ orb_thread_.reset (new TORBThread (orb_));
- // set the orb in the receiver_i_ object.
- receiver_i_.orb (orb_);
+ // set the orb in the receiver_i_ object.
+ receiver_i_.orb (orb_);
- // read the ior from file
- ReadIOR (ior_file_name_);
+ // read the ior from file
+ ReadIOR (ior_file_name_);
- CORBA::Object_var server_object =
- orb_->string_to_object (ior_.c_str ());
+ CORBA::Object_var server_object =
+ orb_->string_to_object (ior_.c_str ());
- if (CORBA::is_nil (server_object.in ()))
- throw Exception ("Invalid IOR " + ior_);
+ if (CORBA::is_nil (server_object.in ()))
+ throw Exception ("Invalid IOR " + ior_);
- server_ = Broadcaster::_narrow (server_object);
+ server_ = Broadcaster::_narrow (server_object);
- receiver_var_ = receiver_i_._this ();
+ receiver_var_ = receiver_i_._this ();
- // Register ourselves with the server.
- server_->add (receiver_var_, nickname_.c_str ());
+ // Register ourselves with the server.
+ server_->add (receiver_var_, nickname_.c_str ());
+ }
+ catch (CORBA::Exception &e)
+ {
+ ShowMessage ("CORBA Exception in TChatClientWindow constructor: "
+ + String (e._id ()));
+ throw;
+ }
}
//---------------------------------------------------------------------------
void __fastcall TChatClientWindow::ReadIOR (String filename)
diff --git a/TAO/examples/Callback_Quoter/Consumer_Handler.cpp b/TAO/examples/Callback_Quoter/Consumer_Handler.cpp
index 9b1daa80a75..3e4a5a74359 100644
--- a/TAO/examples/Callback_Quoter/Consumer_Handler.cpp
+++ b/TAO/examples/Callback_Quoter/Consumer_Handler.cpp
@@ -313,7 +313,8 @@ Consumer_Handler::run (void)
{
// Obtain and activate the RootPOA.
CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("RootPOA");
+ this->orb_->resolve_initial_references ("RootPOA", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV);