diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp b/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp index deacbd41cf5..13b38644e22 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Bindings_Iterator_T.cpp @@ -17,7 +17,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::TAO_Bindings_Iterator ( ITERATOR *hash_iter, PortableServer::POA_ptr poa, TAO_SYNCH_RECURSIVE_MUTEX &lock) - : destroyed_ (0), + : destroyed_ (false), context_ (context), hash_iter_ (hash_iter), lock_ (lock), @@ -46,9 +46,8 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::_default_POA () template <class ITERATOR, class TABLE_ENTRY> CORBA::Boolean 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 +64,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 +72,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 +89,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; @@ -101,7 +100,6 @@ template <class ITERATOR, class TABLE_ENTRY> CORBA::Boolean TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_n ( CORBA::ULong how_many, CosNaming::BindingList_out bl) - ACE_THROW_SPEC ((CORBA::SystemException)) { // We perform an allocation before obtaining the lock so that an out // parameter is allocated in case we fail to obtain the lock. @@ -116,7 +114,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 +122,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 +146,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) { @@ -164,7 +162,6 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::next_n ( template <class ITERATOR, class TABLE_ENTRY> void TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::destroy (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_GUARD_THROW_EX (TAO_SYNCH_RECURSIVE_MUTEX, ace_mon, @@ -176,7 +173,7 @@ TAO_Bindings_Iterator<ITERATOR, TABLE_ENTRY>::destroy (void) throw CORBA::OBJECT_NOT_EXIST (); // Mark the object invalid. - this->destroyed_ = 1; + this->destroyed_ = true; PortableServer::ObjectId_var id = poa_->servant_to_id (this); |