diff options
Diffstat (limited to 'TAO/tao/PI/ClientRequestInfo.cpp')
-rw-r--r-- | TAO/tao/PI/ClientRequestInfo.cpp | 151 |
1 files changed, 40 insertions, 111 deletions
diff --git a/TAO/tao/PI/ClientRequestInfo.cpp b/TAO/tao/PI/ClientRequestInfo.cpp index 1bce119c9ee..5a21d8f01dc 100644 --- a/TAO/tao/PI/ClientRequestInfo.cpp +++ b/TAO/tao/PI/ClientRequestInfo.cpp @@ -25,6 +25,8 @@ ACE_RCSID (PI, #include "tao/Service_Context.h" #include "tao/Exception_Data.h" +#include "ace/CORBA_macros.h" + TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_ClientRequestInfo::TAO_ClientRequestInfo (TAO::Invocation_Base *inv) @@ -62,9 +64,7 @@ TAO_ClientRequestInfo::setup_picurrent (void) IOP::ServiceContext * TAO_ClientRequestInfo::get_service_context_i ( TAO_Service_Context &service_context_list, - IOP::ServiceId id - ) - ACE_THROW_SPEC ((CORBA::SystemException)) + IOP::ServiceId id) { IOP::ServiceContext_var service_context; @@ -76,15 +76,12 @@ TAO_ClientRequestInfo::get_service_context_i ( else { // Not found. - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 26, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 26, CORBA::COMPLETED_NO); } } CORBA::Object_ptr TAO_ClientRequestInfo::target (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -93,7 +90,6 @@ TAO_ClientRequestInfo::target (void) CORBA::Object_ptr TAO_ClientRequestInfo::effective_target (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -102,7 +98,6 @@ TAO_ClientRequestInfo::effective_target (void) IOP::TaggedProfile * TAO_ClientRequestInfo::effective_profile (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -125,9 +120,7 @@ TAO_ClientRequestInfo::effective_profile (void) if (ep == 0) { - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, CORBA::COMPLETED_NO); } // @@BAD_PARAM exception @@ -142,15 +135,13 @@ TAO_ClientRequestInfo::effective_profile (void) // with the spec. CORBA::Any * TAO_ClientRequestInfo::received_exception (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); if (this->invocation_->reply_status () != PortableInterceptor::SYSTEM_EXCEPTION && this->invocation_->reply_status () != PortableInterceptor::USER_EXCEPTION) { - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, - CORBA::COMPLETED_NO), 0); + throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } // The spec says that if it is a user exception which can't be @@ -179,42 +170,32 @@ TAO_ClientRequestInfo::received_exception (void) } char * -TAO_ClientRequestInfo::received_exception_id ( - void) - ACE_THROW_SPEC ((CORBA::SystemException)) +TAO_ClientRequestInfo::received_exception_id (void) { this->check_validity (); - CORBA::Exception *caught_exception = - invocation_->caught_exception (); + CORBA::Exception *caught_exception = invocation_->caught_exception (); if (caught_exception == 0) { - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } return CORBA::string_dup (caught_exception->_rep_id ()); } IOP::TaggedComponent * -TAO_ClientRequestInfo::get_effective_component ( - IOP::ComponentId id - ) - ACE_THROW_SPEC ((CORBA::SystemException)) +TAO_ClientRequestInfo::get_effective_component (IOP::ComponentId id) { this->check_validity (); - TAO_Stub *stub = - this->invocation_->effective_target ()->_stubobj (); + TAO_Stub *stub = this->invocation_->effective_target ()->_stubobj (); - TAO_Tagged_Components &ecs = - stub->profile_in_use ()->tagged_components (); + TAO_Tagged_Components &ecs = stub->profile_in_use ()->tagged_components (); IOP::MultipleComponentProfile &components = ecs.components (); - const CORBA::ULong len = components.length (); + CORBA::ULong const len = components.length (); for (CORBA::ULong i = 0; i < len; ++i) { if (components[i].tag == id) @@ -242,24 +223,17 @@ TAO_ClientRequestInfo::get_effective_component ( // No tagged component was found that matched the given // IOP::ComponentId. - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, CORBA::COMPLETED_NO); } IOP::TaggedComponentSeq * -TAO_ClientRequestInfo::get_effective_components ( - IOP::ComponentId id - ) - ACE_THROW_SPEC ((CORBA::SystemException)) +TAO_ClientRequestInfo::get_effective_components (IOP::ComponentId id) { this->check_validity (); - TAO_Stub *stub = - this->invocation_->target ()->_stubobj (); + TAO_Stub *stub = this->invocation_->target ()->_stubobj (); - TAO_Tagged_Components &ecs = - stub->profile_in_use ()->tagged_components (); + TAO_Tagged_Components &ecs = stub->profile_in_use ()->tagged_components (); IOP::MultipleComponentProfile &components = ecs.components (); @@ -298,44 +272,36 @@ TAO_ClientRequestInfo::get_effective_components ( // No tagged component sequence was allocated, meaning no tagged // components were found that matched the given // IOP::ComponentId. - ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 28, CORBA::COMPLETED_NO); } return safe_tagged_components._retn (); } CORBA::Policy_ptr -TAO_ClientRequestInfo::get_request_policy (CORBA::PolicyType type - ) - ACE_THROW_SPEC ((CORBA::SystemException)) +TAO_ClientRequestInfo::get_request_policy (CORBA::PolicyType type) { this->check_validity (); // @@ Do we need to look anywhere else for the request policies? #if TAO_HAS_CORBA_MESSAGING == 1 - return this->invocation_->target ()->_get_policy (type - ); + return this->invocation_->target ()->_get_policy (type); #else ACE_UNUSED_ARG (type); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( - CORBA::SystemException::_tao_minor_code ( - TAO::VMCID, - ENOTSUP), - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::NO_IMPLEMENT ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + ENOTSUP), + CORBA::COMPLETED_NO); #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ } void TAO_ClientRequestInfo::add_request_service_context ( const IOP::ServiceContext & service_context, - CORBA::Boolean replace - ) - ACE_THROW_SPEC ((CORBA::SystemException)) + CORBA::Boolean replace) { this->check_validity (); @@ -351,7 +317,6 @@ TAO_ClientRequestInfo::add_request_service_context ( CORBA::ULong TAO_ClientRequestInfo::request_id (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -428,7 +393,7 @@ TAO_ClientRequestInfo::request_id (void) "(%P|%t) since its request ID generator is not\n" "(%P|%t) supported on this platform.\n")); - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + throw ::CORBA::INTERNAL (); } return id; @@ -436,7 +401,6 @@ TAO_ClientRequestInfo::request_id (void) char * TAO_ClientRequestInfo::operation (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -446,7 +410,6 @@ TAO_ClientRequestInfo::operation (void) Dynamic::ParameterList * TAO_ClientRequestInfo::arguments (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -457,8 +420,7 @@ TAO_ClientRequestInfo::arguments (void) Dynamic::ParameterList_var safe_parameter_list = parameter_list; if (this->parameter_list (*parameter_list) == false) - ACE_THROW_RETURN (CORBA::MARSHAL (), - 0); + throw ::CORBA::MARSHAL (); return safe_parameter_list._retn (); @@ -485,7 +447,6 @@ TAO_ClientRequestInfo::parameter_list (Dynamic::ParameterList ¶m_list) Dynamic::ExceptionList * TAO_ClientRequestInfo::exceptions (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -495,8 +456,7 @@ TAO_ClientRequestInfo::exceptions (void) Dynamic::ExceptionList_var safe_exception_list = exception_list; if (this->exception_list (*exception_list) == false) - ACE_THROW_RETURN (CORBA::MARSHAL (), - 0); + throw ::CORBA::MARSHAL (); return safe_exception_list._retn (); } @@ -504,7 +464,6 @@ TAO_ClientRequestInfo::exceptions (void) bool TAO_ClientRequestInfo::exception_list (Dynamic::ExceptionList &exception_list) { - if (this->invocation_->operation_details ().ex_count ()) { exception_list.length (this->invocation_->operation_details ().ex_count ()); @@ -526,29 +485,22 @@ TAO_ClientRequestInfo::exception_list (Dynamic::ExceptionList &exception_list) Dynamic::ContextList * TAO_ClientRequestInfo::contexts (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } Dynamic::RequestContext * TAO_ClientRequestInfo::operation_context (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, - CORBA::COMPLETED_NO), - 0); + throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } CORBA::Any * TAO_ClientRequestInfo::result (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -560,8 +512,7 @@ TAO_ClientRequestInfo::result (void) CORBA::Any_var safe_result_any = result_any; if (this->result (result_any) == false) - ACE_THROW_RETURN (CORBA::MARSHAL (), - 0); + throw ::CORBA::MARSHAL (); return safe_result_any._retn (); } @@ -579,7 +530,6 @@ TAO_ClientRequestInfo::result (CORBA::Any *any) CORBA::Boolean TAO_ClientRequestInfo::response_expected (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -588,7 +538,6 @@ TAO_ClientRequestInfo::response_expected (void) Messaging::SyncScope TAO_ClientRequestInfo::sync_scope (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); @@ -597,16 +546,13 @@ TAO_ClientRequestInfo::sync_scope (void) PortableInterceptor::ReplyStatus TAO_ClientRequestInfo::reply_status (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); if (this->invocation_->reply_status() == -1) { // A reply hasn't been received yet. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, - CORBA::COMPLETED_NO), - -1); + throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } return this->invocation_->reply_status(); @@ -614,15 +560,12 @@ TAO_ClientRequestInfo::reply_status (void) CORBA::Object_ptr TAO_ClientRequestInfo::forward_reference (void) - ACE_THROW_SPEC ((CORBA::SystemException)) { this->check_validity (); if (this->invocation_->reply_status() != PortableInterceptor::LOCATION_FORWARD) { - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, - CORBA::COMPLETED_NO), - CORBA::Object::_nil ()); + throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } // TAO::Invocation_Base::forward_reference() already duplicates the @@ -632,22 +575,15 @@ TAO_ClientRequestInfo::forward_reference (void) } CORBA::Any * -TAO_ClientRequestInfo::get_slot (PortableInterceptor::SlotId id - ) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableInterceptor::InvalidSlot)) +TAO_ClientRequestInfo::get_slot (PortableInterceptor::SlotId id) { this->check_validity (); - return this->rs_pi_current_.get_slot (id - ); + return this->rs_pi_current_.get_slot (id); } IOP::ServiceContext * -TAO_ClientRequestInfo::get_request_service_context ( - IOP::ServiceId id - ) - ACE_THROW_SPEC ((CORBA::SystemException)) +TAO_ClientRequestInfo::get_request_service_context (IOP::ServiceId id) { this->check_validity (); @@ -655,16 +591,11 @@ TAO_ClientRequestInfo::get_request_service_context ( TAO_Service_Context &service_context_list = this->invocation_->request_service_context (); - return this->get_service_context_i (service_context_list, - id - ); + return this->get_service_context_i (service_context_list, id); } IOP::ServiceContext * -TAO_ClientRequestInfo::get_reply_service_context ( - IOP::ServiceId id - ) - ACE_THROW_SPEC ((CORBA::SystemException)) +TAO_ClientRequestInfo::get_reply_service_context (IOP::ServiceId id) { this->check_validity (); @@ -672,9 +603,7 @@ TAO_ClientRequestInfo::get_reply_service_context ( TAO_Service_Context &service_context_list = this->invocation_->reply_service_context (); - return this->get_service_context_i (service_context_list, - id - ); + return this->get_service_context_i (service_context_list, id); } void |