diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp index 64bd7e250f3..5988fdd7ce0 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/EC_Wrapper.cpp @@ -22,15 +22,14 @@ EC_Wrapper::create (void) EC_Wrapper::~EC_Wrapper (void) { - ACE_TRY_NEW_ENV + try { this->destroy_ec (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { // ignore } - ACE_ENDTRY; } int @@ -58,18 +57,16 @@ EC_Wrapper::init (CORBA::ORB_ptr orb, -1); auto_ptr<TAO_EC_Event_Channel> impl_release (impl); - ACE_TRY_NEW_ENV + try { impl->activate (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Suppressed the following exception " - "in EC_Wrapper::init:\n"); + ex._tao_print_exception ( + "Suppressed the following exception ""in EC_Wrapper::init:\n"); return -1; } - ACE_ENDTRY; this->ec_impl_ = impl_release.release (); return 0; @@ -115,44 +112,41 @@ EC_Wrapper::destroy (void) // Deregister from POA. this->deactivator_.deactivate (); - ACE_TRY + try { this->destroy_ec (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { this->orb_->shutdown (); - ACE_RE_THROW; + throw; } - ACE_ENDTRY; this->orb_->shutdown (); } RtecEventChannelAdmin::Observer_Handle -EC_Wrapper::append_observer (RtecEventChannelAdmin::Observer_ptr observer - ACE_ENV_ARG_DECL) +EC_Wrapper::append_observer (RtecEventChannelAdmin::Observer_ptr observer) ACE_THROW_SPEC (( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER)) { if (this->ec_impl_) - return this->ec_impl_->append_observer (observer ACE_ENV_ARG_PARAMETER); + return this->ec_impl_->append_observer (observer); else ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), 0); } void -EC_Wrapper::remove_observer (RtecEventChannelAdmin::Observer_Handle handle - ACE_ENV_ARG_DECL) +EC_Wrapper::remove_observer (RtecEventChannelAdmin::Observer_Handle handle) ACE_THROW_SPEC (( CORBA::SystemException, RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannelAdmin::EventChannel::CANT_REMOVE_OBSERVER)) { if (this->ec_impl_) - this->ec_impl_->remove_observer (handle ACE_ENV_ARG_PARAMETER); + this->ec_impl_->remove_observer (handle); else - ACE_THROW (CORBA::OBJECT_NOT_EXIST ()); + throw CORBA::OBJECT_NOT_EXIST (); } |