From ea50b73f101cdfe0ae5ad004eabefd79ce211191 Mon Sep 17 00:00:00 2001 From: Angelo Corsaro Date: Fri, 9 Feb 2001 00:30:17 +0000 Subject: Thu Feb 08 18:15:59 2001 Angelo Corsaro --- TAO/tao/MProfile.i | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'TAO/tao/MProfile.i') diff --git a/TAO/tao/MProfile.i b/TAO/tao/MProfile.i index d13887e406b..1623cd10b18 100644 --- a/TAO/tao/MProfile.i +++ b/TAO/tao/MProfile.i @@ -253,19 +253,13 @@ TAO_MProfile::add_profile (TAO_Profile *pfile) } ACE_INLINE void -TAO_MProfile::create_policy_list (void) +TAO_MProfile::create_policy_list (CORBA::Environment &ACE_TRY_ENV) { - // Precondition: Make sure that the policy list - // has not already allocated. - ACE_ASSERT (this->policy_list_ == 0); - - ACE_NEW (this->policy_list_, CORBA::PolicyList ()); - - // Post-Condition: Make sure that the memory get allcated - // for real. - ACE_ASSERT (this->policy_list_ != 0); - - // @@ Marina & Irfan I would raise an exception in this case. + ACE_NEW_THROW_EX (this->policy_list_, + CORBA::PolicyList, + CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE, + CORBA::COMPLETED_NO) + ); } -- cgit v1.2.1