diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-08 01:08:32 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-08 01:08:32 +0000 |
commit | 78ae675a995746ed9c06cebcb299c5ab24adc091 (patch) | |
tree | 7ab7c47d9e7d717d76039c027c28553562075526 /TAO/tao/Exception.cpp | |
parent | 7df63542de3b2332e1bcbd60c16b0997ea5af417 (diff) | |
download | ATCD-78ae675a995746ed9c06cebcb299c5ab24adc091.tar.gz |
ChangeLogTag:Thu Feb 7 17:06:24 2002 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/Exception.cpp')
-rw-r--r-- | TAO/tao/Exception.cpp | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index 902a399b26f..85ab68a06c1 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -42,15 +42,13 @@ extern CORBA::TypeCode_ptr TC_completion_status; // **************************************************************** CORBA_Exception::CORBA_Exception (const char *repository_id) - : id_ (CORBA::string_dup (repository_id)), - refcount_ (0) + : id_ (CORBA::string_dup (repository_id)) { ACE_ASSERT (this->id_ != 0); } CORBA_Exception::CORBA_Exception (const CORBA_Exception &src) - : id_ (CORBA::string_dup (src.id_)), - refcount_ (0) + : id_ (CORBA::string_dup (src.id_)) { ACE_ASSERT (this->id_ != 0); } @@ -60,15 +58,12 @@ CORBA_Exception::CORBA_Exception (const CORBA_Exception &src) // can do this because it's got the typecode. CORBA_Exception::CORBA_Exception (void) - : id_ (0), - refcount_ (0) + : id_ (0) { } CORBA_Exception::~CORBA_Exception (void) { - ACE_ASSERT (this->refcount_ == 0); - CORBA::string_free (this->id_); } @@ -120,29 +115,6 @@ CORBA_Exception::_tao_any_destructor (void *x) delete tmp; } -CORBA::ULong -CORBA_Exception::_incr_refcnt (void) -{ - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->refcount_lock_, 0); - return ++this->refcount_; -} - -CORBA::ULong -CORBA_Exception::_decr_refcnt (void) -{ - { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->refcount_lock_, 0); - this->refcount_--; - if (this->refcount_ != 0) - return this->refcount_; - - // release the lock before destroying the object. - } - - delete this; - return 0; -} - #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) // Convenient ostrean operator. @@ -1154,6 +1126,17 @@ CORBA_##name ::_tao_any_destructor (void *x) \ STANDARD_EXCEPTION_LIST #undef TAO_SYSTEM_EXCEPTION +#define TAO_SYSTEM_EXCEPTION(name) \ +CORBA_Exception * \ +CORBA_##name ::_tao_duplicate (void) const \ +{ \ + CORBA_Exception *result; \ + ACE_NEW_RETURN (result, CORBA_##name (*this), 0); \ + return result; \ +} +STANDARD_EXCEPTION_LIST +#undef TAO_SYSTEM_EXCEPTION + static void tao_insert_for_insertion_system_exception (CORBA::Any &any, const CORBA::SystemException &ex, |