diff options
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp | 31 | ||||
-rw-r--r-- | TAO/tao/Any.cpp | 31 | ||||
-rw-r--r-- | TAO/tao/Any.h | 5 | ||||
-rw-r--r-- | TAO/tao/BoundsC.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/BoundsC.h | 2 | ||||
-rw-r--r-- | TAO/tao/DynAnyC.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/Exception.cpp | 214 | ||||
-rw-r--r-- | TAO/tao/Exception.h | 38 | ||||
-rw-r--r-- | TAO/tao/IORC.cpp | 16 | ||||
-rw-r--r-- | TAO/tao/ImplRepoC.cpp | 32 | ||||
-rw-r--r-- | TAO/tao/ImplRepoC.h | 3 | ||||
-rw-r--r-- | TAO/tao/InconsistentTypeCodeC.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/PolicyC.cpp | 23 | ||||
-rw-r--r-- | TAO/tao/PolicyC.h | 2 | ||||
-rw-r--r-- | TAO/tao/PollableC.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/PortableServerC.cpp | 58 | ||||
-rw-r--r-- | TAO/tao/PortableServerC.h | 1 | ||||
-rw-r--r-- | TAO/tao/RTCORBAC.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Typecode.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/WrongTransactionC.cpp | 4 |
22 files changed, 370 insertions, 152 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp index 5e7f0bf9132..55d81c1954a 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp @@ -56,8 +56,7 @@ int be_visitor_exception_ch::visit_exception (be_exception *node) *os << "class " << idl_global->stub_export_macro () << " " << node->local_name () << " : public CORBA::UserException" << be_nl; - *os << "{" << be_nl - << "public:\n\n"; + *os << "{" << be_nl << "public:" << be_idt_nl; // generate code for field members if (this->visit_scope (node) == -1) @@ -116,9 +115,12 @@ int be_visitor_exception_ch::visit_exception (be_exception *node) *os << be_nl << "// = TAO extension" << be_nl - << "static CORBA::Exception *_alloc (void);" << be_nl - << "virtual CORBA::TypeCode_ptr _type (void) const;" << be_uidt_nl - << "}; // exception " << node->name () + << "static CORBA::Exception *_alloc (void);"; + + if (!node->is_local () && idl_global->tc_support ()) + *os << be_nl <<"virtual CORBA::TypeCode_ptr _type (void) const;"; + + *os << be_uidt_nl << "}; // exception " << node->name () << "\n" << be_nl; if (!node->is_local ()) diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp index d17e2e44cff..307bb43c836 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp @@ -64,10 +64,8 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) *os << "// default constructor" << be_nl; *os << node->name () << "::" << node->local_name () << " (void)" << be_nl; if (!node->is_local ()) - *os << " : CORBA_UserException (" - << "::" << node->tc_name () << ")\n"; -// *os << " : CORBA_UserException (\"" -// << node->repoID () << "\")\n"; + *os << " : CORBA_UserException (\"" + << node->repoID () << "\")\n"; *os << "{" << be_nl; *os << "}\n\n"; @@ -95,8 +93,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) *os << node->name () << "::" << node->local_name () << " (const ::" << node->name () << " &_tao_excp)" << be_nl; *os << " : CORBA_UserException (" - << "_tao_excp._type ())" << be_nl; -// << "_tao_excp._id ())" << be_nl; + << "_tao_excp._id ())" << be_nl; *os << "{\n"; be_visitor_context ctx (*this->ctx_); @@ -265,10 +262,8 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) if (!node->is_local ()) *os << " : CORBA_UserException " - << " (CORBA::TypeCode::_duplicate (" << node->tc_name () - << "))" << be_nl; -// << " (CORBA::string_dup (\"" << node->repoID () -// << "\"))" << be_nl; + << " (CORBA::string_dup (\"" << node->repoID () + << "\"))" << be_nl; *os << "{\n"; os->incr_indent (); // assign each individual member. We need yet another state @@ -310,21 +305,15 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) } } - *os << "\n// TAO extension - the virtual _type method" << be_nl; - *os << "CORBA::TypeCode_ptr " << node->name () - << "::_type (void) const" << be_nl; - *os << "{" << be_idt_nl; - if (!node->is_local () && idl_global->tc_support ()) { + *os << "\n// TAO extension - the virtual _type method" << be_nl; + *os << "CORBA::TypeCode_ptr " << node->name () + << "::_type (void) const" << be_nl; + *os << "{" << be_idt_nl; *os << "return ::" << node->tc_name () << ";" << be_uidt_nl; + *os << "}" << be_nl << be_nl; } - else - { - *os << "return CORBA::TypeCode::_nil ();" << be_uidt_nl; - } - - *os << "}" << be_nl << be_nl; node->cli_stub_gen (I_TRUE); } diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 10d187c855a..009348c2409 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -548,6 +548,7 @@ CORBA_Any::operator<<= (CORBA::TypeCode_ptr tc) stream.begin ()); } +// Insertion of CORBA::Exception - copying void CORBA_Any::operator<<= (const CORBA_Exception &exception) { @@ -573,8 +574,36 @@ CORBA_Any::operator<<= (const CORBA_Exception &exception) ACE_CHECK; } -// Insertion of CORBA object - copying. +// Insertion of CORBA::Exception - non-copying +void +CORBA_Any::operator<<= (CORBA_Exception *exception) +{ + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY + { + TAO_OutputCDR stream; + exception->_tao_encode (stream, ACE_TRY_ENV); + ACE_TRY_CHECK; + + this->_tao_replace (exception->_type (), + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + exception, + CORBA_Exception::_tao_any_destructor); + } + ACE_CATCHANY + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Exception in CORBA::Exception insertion\n"))); + } + ACE_ENDTRY; + ACE_CHECK; +} +// Insertion of CORBA object - copying. void CORBA::Any::operator<<= (const CORBA::Object_ptr obj) { diff --git a/TAO/tao/Any.h b/TAO/tao/Any.h index 7648467f9fd..badedeb2f4f 100644 --- a/TAO/tao/Any.h +++ b/TAO/tao/Any.h @@ -228,7 +228,10 @@ public: // insert a bounded wide string void operator<<= (const CORBA_Exception &exception); - // insert an exception into the Any + // insert an exception into the Any (copying) + + void operator<<= (CORBA_Exception *exception); + // insert an exception into the Any (non-copying) // = Special types. diff --git a/TAO/tao/BoundsC.cpp b/TAO/tao/BoundsC.cpp index 4b17b459691..80f7b830f0d 100644 --- a/TAO/tao/BoundsC.cpp +++ b/TAO/tao/BoundsC.cpp @@ -17,7 +17,7 @@ // default constructor CORBA_Bounds::CORBA_Bounds (void) - : CORBA_UserException (CORBA::_tc_Bounds) + : CORBA_UserException ("IDL:omg.org/CORBA/Bounds:1.0") { } @@ -34,9 +34,9 @@ void CORBA_Bounds::_tao_any_destructor (void *x) // copy constructor CORBA_Bounds::CORBA_Bounds (const CORBA::Bounds &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator CORBA_Bounds& @@ -91,7 +91,11 @@ CORBA::Exception *CORBA_Bounds::_alloc (void) return retval; } - +CORBA::TypeCode_ptr +CORBA_Bounds::_type (void) const +{ + return CORBA::TypeCode::_tc_Bounds; +} void operator<<= (CORBA::Any &_tao_any, const CORBA::Bounds &_tao_elem) { diff --git a/TAO/tao/BoundsC.h b/TAO/tao/BoundsC.h index 5ba26ee74d4..a3f04327beb 100644 --- a/TAO/tao/BoundsC.h +++ b/TAO/tao/BoundsC.h @@ -63,7 +63,7 @@ // = TAO extension static CORBA::Exception *_alloc (void); - + virtual CORBA::TypeCode_ptr _type (void) const; }; // exception CORBA::Bounds #endif /* end #if !defined */ diff --git a/TAO/tao/DynAnyC.cpp b/TAO/tao/DynAnyC.cpp index 6a0afb68851..b497514fa25 100644 --- a/TAO/tao/DynAnyC.cpp +++ b/TAO/tao/DynAnyC.cpp @@ -81,7 +81,7 @@ CORBA_DynAny_ptr CORBA_DynAny::_nil (void) // default constructor CORBA_DynAny::Invalid::Invalid (void) - : CORBA_UserException (CORBA_DynAny::_tc_Invalid) + : CORBA_UserException ("IDL:/CORBA_DynAny/Invalid:1.0") { } @@ -92,9 +92,9 @@ CORBA_DynAny::Invalid::~Invalid (void) // copy constructor CORBA_DynAny::Invalid::Invalid (const CORBA_DynAny::Invalid &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator CORBA_DynAny::Invalid& @@ -176,7 +176,7 @@ CORBA::TypeCode_ptr CORBA_DynAny::_tc_Invalid = // default constructor CORBA_DynAny::InvalidValue::InvalidValue (void) - : CORBA_UserException (CORBA_DynAny::_tc_InvalidValue) + : CORBA_UserException ("IDL:/CORBA_DynAny/InvalidValue:1.0") { } @@ -189,7 +189,7 @@ CORBA_DynAny::InvalidValue::~InvalidValue (void) CORBA_DynAny::InvalidValue::InvalidValue ( const CORBA_DynAny::InvalidValue &_tao_excp ) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } @@ -279,7 +279,7 @@ CORBA::TypeCode_ptr CORBA_DynAny::_tc_InvalidValue = // default constructor CORBA_DynAny::TypeMismatch::TypeMismatch (void) - : CORBA_UserException (CORBA_DynAny::_tc_TypeMismatch) + : CORBA_UserException ("IDL:/CORBA_DynAny/TypeMismatch:1.0") { } @@ -292,7 +292,7 @@ CORBA_DynAny::TypeMismatch::~TypeMismatch (void) CORBA_DynAny::TypeMismatch::TypeMismatch ( const CORBA_DynAny::TypeMismatch &_tao_excp ) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } @@ -381,7 +381,7 @@ CORBA::TypeCode_ptr CORBA_DynAny::_tc_TypeMismatch = // default constructor CORBA_DynAny::InvalidSeq::InvalidSeq (void) - : CORBA_UserException (CORBA_DynAny::_tc_InvalidSeq) + : CORBA_UserException ("IDL:/CORBA_DynAny/InvalidSeq:1.0") { } @@ -394,7 +394,7 @@ CORBA_DynAny::InvalidSeq::~InvalidSeq (void) CORBA_DynAny::InvalidSeq::InvalidSeq ( const CORBA_DynAny::InvalidSeq &_tao_excp ) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index 22b242d6fba..53eb6abac77 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -9,6 +9,7 @@ #include "tao/Environment.h" #include "tao/Any.h" #include "tao/CDR.h" +#include "tao/ORB.h" #if defined(ACE_MVS) #include "ace/Codeset_IBM1047.h" @@ -34,18 +35,18 @@ extern CORBA::TypeCode_ptr TC_completion_status; // **************************************************************** -CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc) - : type_ (CORBA::TypeCode::_duplicate (tc)), +CORBA_Exception::CORBA_Exception (const char *repository_id) + : id_ (CORBA::string_dup (repository_id)), refcount_ (0) { - ACE_ASSERT (this->type_ != 0); + ACE_ASSERT (this->id_ != 0); } CORBA_Exception::CORBA_Exception (const CORBA_Exception &src) - : type_ (CORBA::TypeCode::_duplicate (src.type_)), + : id_ (CORBA::string_dup (src.id_)), refcount_ (0) { - ACE_ASSERT (this->type_ != 0); + ACE_ASSERT (this->id_ != 0); } // NOTE: It's this code, not anything defined in a subclass, which is @@ -53,7 +54,7 @@ CORBA_Exception::CORBA_Exception (const CORBA_Exception &src) // can do this because it's got the typecode. CORBA_Exception::CORBA_Exception (void) - : type_ (0), + : id_ (0), refcount_ (0) { } @@ -61,19 +62,17 @@ CORBA_Exception::CORBA_Exception (void) CORBA_Exception::~CORBA_Exception (void) { ACE_ASSERT (this->refcount_ == 0); - // NW: Since local exception doesn't have a valid type, I commented - // the following assertion out. - // ACE_ASSERT (this->type_ != 0); - CORBA::release (this->type_); + + CORBA::string_free (this->id_); } CORBA_Exception & CORBA_Exception::operator= (const CORBA_Exception &src) { - if (this->type_) - CORBA::release (this->type_); - this->type_ = CORBA::TypeCode::_duplicate (src.type_); - ACE_ASSERT (this->type_ != 0); + if (this->id_) + CORBA::string_free (this->id_); + this->id_ = CORBA::string_dup (src.id_); + ACE_ASSERT (this->id_ != 0); return *this; } @@ -81,18 +80,13 @@ CORBA_Exception::operator= (const CORBA_Exception &src) const char * CORBA_Exception::_id (void) const { - CORBA::Environment env; - - if (this->type_) - return this->type_->id (env); - else - return 0; + return this->id_; } CORBA::TypeCode_ptr CORBA_Exception::_type (void) const { - return this->type_; + return CORBA::TypeCode::_nil (); } int @@ -132,6 +126,13 @@ CORBA_Exception::_info (void) const return user_exception_info; } +void +CORBA_Exception::_tao_any_destructor (void *x) +{ + CORBA_Exception *tmp = ACE_static_cast (CORBA_Exception *, x); + delete tmp; +} + CORBA::ULong CORBA_Exception::_incr_refcnt (void) { @@ -161,19 +162,22 @@ CORBA_Exception::_decr_refcnt (void) ostream& operator<< (ostream &os, const CORBA_Exception &e) { - CORBA::Any tmp; - tmp <<= e; + const char *p = 0; + + CORBA::TypeCode_ptr tc = e._type (); - CORBA::TypeCode_var tc = tmp.type (); - const char *p = tc->name (); + if (tc != CORBA::TypeCode::_nil ()) + { + p = tc->name (); + } if (*p != '\0') { - os << p << " (" << tc->id () << ')'; + os << p << " (" << e._id () << ')'; } else { - os << tc->id (); + os << e._id (); } return os; @@ -187,8 +191,8 @@ CORBA_UserException::CORBA_UserException (void) { } -CORBA_UserException::CORBA_UserException (CORBA::TypeCode_ptr tc) - : CORBA_Exception (tc) +CORBA_UserException::CORBA_UserException (const char *repository_id) + : CORBA_Exception (repository_id) { } @@ -224,10 +228,10 @@ CORBA_SystemException::CORBA_SystemException (void) { } -CORBA_SystemException::CORBA_SystemException (CORBA::TypeCode_ptr tc, +CORBA_SystemException::CORBA_SystemException (const char *repository_id, CORBA::ULong code, CORBA::CompletionStatus completed) - : CORBA_Exception (tc), + : CORBA_Exception (repository_id), minor_ (code), completed_ (completed) { @@ -567,13 +571,13 @@ CORBA_SystemException::_info (void) const } CORBA_UnknownUserException::CORBA_UnknownUserException (void) - : CORBA_UserException (CORBA::_tc_UnknownUserException), + : CORBA_UserException ("IDL:omg.org/CORBA/UnknownUserException:1.0"), exception_ (0) { } CORBA_UnknownUserException::CORBA_UnknownUserException (CORBA_Any &ex) - : CORBA_UserException (CORBA::_tc_UnknownUserException) + : CORBA_UserException ("IDL:omg.org/CORBA/UnknownUserException:1.0") { ACE_NEW (this->exception_, CORBA_Any (ex)); @@ -581,7 +585,7 @@ CORBA_UnknownUserException::CORBA_UnknownUserException (CORBA_Any &ex) CORBA_UnknownUserException::CORBA_UnknownUserException ( const CORBA_UnknownUserException& e) - : CORBA_UserException (e._type ()) + : CORBA_UserException (e._id ()) { ACE_NEW (this->exception_, CORBA_Any (*e.exception_)); @@ -635,6 +639,12 @@ CORBA_UnknownUserException::_tao_decode (TAO_InputCDR &, ACE_THROW (CORBA::MARSHAL ()); } +CORBA::TypeCode_ptr +CORBA_UnknownUserException::_type (void) const +{ + return CORBA::_tc_UnknownUserException; +} + // Note that "buffer" holds the (unscoped) name originally, and is // then overwritten. @@ -882,12 +892,11 @@ TAO_Exceptions::init (CORBA::Environment &ACE_TRY_ENV) CORBA_SystemException * TAO_Exceptions::create_system_exception (const char *id, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &) { #define TAO_SYSTEM_EXCEPTION(name) \ { \ - const char* xid = CORBA::_tc_ ## name ->id (ACE_TRY_ENV); \ - ACE_CHECK_RETURN (0); \ + const char* xid = "IDL:omg.org/CORBA/" #name ":1.0"; \ if (ACE_OS::strcmp (id, xid) == 0) \ return new CORBA:: name; \ } @@ -948,7 +957,7 @@ STANDARD_EXCEPTION_LIST #define TAO_SYSTEM_EXCEPTION(name) \ CORBA_##name :: CORBA_##name (void) \ - : CORBA_SystemException (CORBA::_tc_ ## name, \ + : CORBA_SystemException ("IDL:omg.org/CORBA/" #name ":1.0", \ TAO_DEFAULT_MINOR_CODE, \ CORBA::COMPLETED_NO) \ { \ @@ -956,6 +965,135 @@ CORBA_##name :: CORBA_##name (void) \ STANDARD_EXCEPTION_LIST #undef TAO_SYSTEM_EXCEPTION +#define TAO_SYSTEM_EXCEPTION(name) \ +CORBA::TypeCode_ptr \ +CORBA_##name ::_type (void) const \ +{ \ + return CORBA::_tc_ ## name; \ +} +STANDARD_EXCEPTION_LIST +#undef TAO_SYSTEM_EXCEPTION + +#define TAO_SYSTEM_EXCEPTION(name) \ +void \ +CORBA_##name ::_tao_any_destructor (void *x) \ +{ \ + CORBA_##name *tmp = ACE_static_cast (CORBA_##name *, x); \ + delete tmp; \ +} +STANDARD_EXCEPTION_LIST +#undef TAO_SYSTEM_EXCEPTION + +#define TAO_SYSTEM_EXCEPTION(name) \ +void operator<<= (CORBA::Any &any, const CORBA_##name &ex) \ +{ \ + ACE_TRY_NEW_ENV \ + { \ + TAO_OutputCDR stream; \ + ex._tao_encode (stream, ACE_TRY_ENV); \ + ACE_CHECK; \ + any._tao_replace (ex._type (), \ + TAO_ENCAP_BYTE_ORDER, \ + stream.begin ()); \ + } \ + ACE_CATCHANY \ + { \ + ACE_PRINT_EXCEPTION ( \ + ACE_ANY_EXCEPTION, \ + "\tCORBA::Any insertion (copy) of CORBA_" #name "\n" \ + ); \ + } \ + ACE_ENDTRY; \ + ACE_CHECK; \ +} +STANDARD_EXCEPTION_LIST +#undef TAO_SYSTEM_EXCEPTION + +#define TAO_SYSTEM_EXCEPTION(name) \ +void operator<<= (CORBA::Any &any, CORBA_##name *ex) \ +{ \ + ACE_TRY_NEW_ENV \ + { \ + TAO_OutputCDR stream; \ + ex->_tao_encode (stream, ACE_TRY_ENV); \ + ACE_CHECK; \ + any._tao_replace (ex->_type (), \ + TAO_ENCAP_BYTE_ORDER, \ + stream.begin (), \ + 1, \ + ex, \ + CORBA_##name ::_tao_any_destructor); \ + } \ + ACE_CATCHANY \ + { \ + ACE_PRINT_EXCEPTION ( \ + ACE_ANY_EXCEPTION, \ + "\tCORBA::Any insertion (non-copy) of CORBA_" #name "\n" \ + ); \ + } \ + ACE_ENDTRY; \ + ACE_CHECK; \ +} +STANDARD_EXCEPTION_LIST +#undef TAO_SYSTEM_EXCEPTION + +#define TAO_SYSTEM_EXCEPTION(name) \ +CORBA::Boolean operator>>= (const CORBA::Any &any, \ + const CORBA_##name *&ex) \ +{ \ + ex = 0; \ + ACE_TRY_NEW_ENV \ + { \ + CORBA::TypeCode_var type = any.type (); \ + CORBA::Boolean equiv = \ + type->equivalent (CORBA::_tc_##name, ACE_TRY_ENV); \ + ACE_TRY_CHECK; \ + if (!equiv) \ + return 0; \ + if (any.any_owns_data ()) \ + { \ + ex = (CORBA_##name *)any.value (); \ + return 1; \ + } \ + else \ + { \ + CORBA_##name *tmp; \ + ACE_NEW_RETURN (tmp, CORBA_##name, 0); \ + TAO_InputCDR stream ( \ + any._tao_get_cdr (), \ + any._tao_byte_order () \ + ); \ + CORBA::String_var interface_repository_id; \ + if (!(stream >> interface_repository_id.out ())) \ + return 0; \ + if (ACE_OS::strcmp (interface_repository_id.in (), \ + "IDL:omg.org/CORBA/" #name ":1.0")) \ + return 0; \ + tmp->_tao_decode (stream, ACE_TRY_ENV); \ + ACE_TRY_CHECK; \ + ((CORBA::Any *)&any)->_tao_replace ( \ + CORBA::_tc_##name, \ + 1, \ + tmp, \ + CORBA_##name ::_tao_any_destructor \ + ); \ + ex = tmp; \ + return 1; \ + } \ + } \ + ACE_CATCHANY \ + { \ + ACE_PRINT_EXCEPTION ( \ + ACE_ANY_EXCEPTION, \ + "\tCORBA::Any extraction of CORBA_" #name "\n" \ + ); \ + } \ + ACE_ENDTRY; \ + return 0; \ +} +STANDARD_EXCEPTION_LIST +#undef TAO_SYSTEM_EXCEPTION + #undef STANDARD_EXCEPTION_LIST CORBA_ExceptionList::CORBA_ExceptionList (CORBA::ULong len, diff --git a/TAO/tao/Exception.h b/TAO/tao/Exception.h index 4069b85f6e6..be42b846838 100644 --- a/TAO/tao/Exception.h +++ b/TAO/tao/Exception.h @@ -69,14 +69,14 @@ public: const char *_id (void) const; // Return the repository ID of the Exception. - CORBA::TypeCode_ptr _type (void) const; - // Return the TypeCode corresponding to the currently stored. + virtual CORBA::TypeCode_ptr _type (void) const; + // Will be overridden in the concrete derived classes. // = To implement the narrow method. virtual int _is_a (const char* repository_id) const; - CORBA_Exception (CORBA::TypeCode_ptr type); - // Constructor from a TypeCode. + CORBA_Exception (const char* repository_id); + // Constructor from a respository id. void _tao_print_exception (const char *info, FILE *f = stdout) const; @@ -92,6 +92,9 @@ public: virtual void _tao_decode (TAO_InputCDR &cdr, CORBA::Environment &) = 0; + static void _tao_any_destructor (void *); + // Used in the non-copying Any insertion operator. + // = Methods required for memory management support. CORBA::ULong _incr_refcnt (void); CORBA::ULong _decr_refcnt (void); @@ -100,10 +103,10 @@ protected: CORBA_Exception (void); // Default constructor is protected. - CORBA::TypeCode_ptr type_; - // Type of the Exception. - private: + char *id_; + // Storage of our repository id. + CORBA::ULong refcount_; // Reference count to avoid copying overhead. @@ -144,8 +147,8 @@ public: // = TAO specific extension. - CORBA_UserException (CORBA::TypeCode_ptr tc); - // Constructor from a TypeCode. + CORBA_UserException (const char* repository_id); + // Constructor from a repository id. virtual int _is_a (const char *interface_id) const; // Used for narrowing @@ -220,10 +223,10 @@ public: // value. protected: - CORBA_SystemException (CORBA::TypeCode_ptr tc, + CORBA_SystemException (const char *repository_id, CORBA::ULong code, CORBA::CompletionStatus completed); - // Ctor using a TypeCode. + // Ctor using a repository id. private: CORBA::ULong minor_; @@ -244,12 +247,18 @@ public: \ CORBA_ ## name (void); \ CORBA_ ## name (CORBA::ULong code, \ CORBA::CompletionStatus completed) \ - : CORBA_SystemException (CORBA::_tc_ ## name, code, completed) \ + : CORBA_SystemException ("IDL:omg.org/CORBA/" #name ":1.0", code, completed) \ { } \ static CORBA_##name * _downcast (CORBA_Exception* exception); \ virtual int _is_a (const char* type_id) const; \ virtual void _raise (void); \ -} + virtual CORBA::TypeCode_ptr _type (void) const; \ + static void _tao_any_destructor (void*); \ +}; \ +TAO_Export void operator<<= (CORBA::Any &, const CORBA_##name &); \ +TAO_Export void operator<<= (CORBA::Any &, CORBA_##name *); \ +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, \ + const CORBA_##name *&) TAO_SYSTEM_EXCEPTION(UNKNOWN); // the unknown exception @@ -333,6 +342,9 @@ public: virtual int _is_a (const char *type_id) const; // Helper method to implement _downcast. + virtual CORBA::TypeCode_ptr _type (void) const; + // This class has a specific typecode. + private: CORBA_Any *exception_; // Holder for the actual exception. diff --git a/TAO/tao/IORC.cpp b/TAO/tao/IORC.cpp index b0f005a28dd..e7b374884b1 100644 --- a/TAO/tao/IORC.cpp +++ b/TAO/tao/IORC.cpp @@ -72,9 +72,9 @@ TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList::~EmptyProfileList (void) // copy constructor TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList::EmptyProfileList (const ::TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList& @@ -137,9 +137,9 @@ TAO_IOP::TAO_IOR_Manipulation::NotFound::~NotFound (void) // copy constructor TAO_IOP::TAO_IOR_Manipulation::NotFound::NotFound (const ::TAO_IOP::TAO_IOR_Manipulation::NotFound &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator TAO_IOP::TAO_IOR_Manipulation::NotFound& @@ -202,9 +202,9 @@ TAO_IOP::TAO_IOR_Manipulation::Duplicate::~Duplicate (void) // copy constructor TAO_IOP::TAO_IOR_Manipulation::Duplicate::Duplicate (const ::TAO_IOP::TAO_IOR_Manipulation::Duplicate &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator TAO_IOP::TAO_IOR_Manipulation::Duplicate& @@ -267,9 +267,9 @@ TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR::~Invalid_IOR (void) // copy constructor TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR::Invalid_IOR (const ::TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR& diff --git a/TAO/tao/ImplRepoC.cpp b/TAO/tao/ImplRepoC.cpp index e5ad32490c2..63114f807b7 100644 --- a/TAO/tao/ImplRepoC.cpp +++ b/TAO/tao/ImplRepoC.cpp @@ -998,7 +998,7 @@ ImplementationRepository::Administration::_duplicate (Administration_ptr obj) // default constructor ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (void) - : CORBA_UserException (::ImplementationRepository::Administration::_tc_AlreadyRegistered) + : CORBA_UserException ("IDL:ImplementationRepository/Administration/AlreadyRegistered:1.0") { } @@ -1015,7 +1015,7 @@ void ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destr // copy constructor ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (const ::ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } @@ -1082,9 +1082,15 @@ static const CORBA::Long _oc_ImplementationRepository_Administration_AlreadyRegi static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration_AlreadyRegistered (CORBA::tk_except, sizeof (_oc_ImplementationRepository_Administration_AlreadyRegistered), (char *) &_oc_ImplementationRepository_Administration_AlreadyRegistered, 0, sizeof (ImplementationRepository::Administration::AlreadyRegistered)); CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_AlreadyRegistered = &_tc_TAO_tc_ImplementationRepository_Administration_AlreadyRegistered; +CORBA::TypeCode_ptr +ImplementationRepository::Administration::AlreadyRegistered::_type (void) const +{ + return _tc_AlreadyRegistered; +} + // default constructor ImplementationRepository::Administration::CannotActivate::CannotActivate (void) - : CORBA_UserException (::ImplementationRepository::Administration::_tc_CannotActivate) + : CORBA_UserException ("IDL:ImplementationRepository/Administration/CannotActivate:1.0") { } @@ -1101,7 +1107,7 @@ void ImplementationRepository::Administration::CannotActivate::_tao_any_destruct // copy constructor ImplementationRepository::Administration::CannotActivate::CannotActivate (const ::ImplementationRepository::Administration::CannotActivate &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { this->reason = CORBA::string_dup (_tao_excp.reason.in ()); } @@ -1163,7 +1169,7 @@ CORBA::Exception *ImplementationRepository::Administration::CannotActivate::_all ImplementationRepository::Administration::CannotActivate::CannotActivate ( const char * _tao_reason ) - : CORBA_UserException (CORBA::TypeCode::_duplicate (ImplementationRepository::Administration::_tc_CannotActivate)) + : CORBA_UserException (CORBA::string_dup ("IDL:ImplementationRepository/Administration/CannotActivate:1.0")) { this->reason = CORBA::string_dup (_tao_reason); } @@ -1181,9 +1187,15 @@ static const CORBA::Long _oc_ImplementationRepository_Administration_CannotActiv static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration_CannotActivate (CORBA::tk_except, sizeof (_oc_ImplementationRepository_Administration_CannotActivate), (char *) &_oc_ImplementationRepository_Administration_CannotActivate, 0, sizeof (ImplementationRepository::Administration::CannotActivate)); CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_CannotActivate = &_tc_TAO_tc_ImplementationRepository_Administration_CannotActivate; +CORBA::TypeCode_ptr +ImplementationRepository::Administration::CannotActivate::_type (void) const +{ + return _tc_CannotActivate; +} + // default constructor ImplementationRepository::Administration::NotFound::NotFound (void) - : CORBA_UserException (::ImplementationRepository::Administration::_tc_NotFound) + : CORBA_UserException ("IDL:ImplementationRepository/Administration/NotFound:1.0") { } @@ -1200,7 +1212,7 @@ void ImplementationRepository::Administration::NotFound::_tao_any_destructor (vo // copy constructor ImplementationRepository::Administration::NotFound::NotFound (const ::ImplementationRepository::Administration::NotFound &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } @@ -1267,6 +1279,12 @@ static const CORBA::Long _oc_ImplementationRepository_Administration_NotFound[] static CORBA::TypeCode _tc_TAO_tc_ImplementationRepository_Administration_NotFound (CORBA::tk_except, sizeof (_oc_ImplementationRepository_Administration_NotFound), (char *) &_oc_ImplementationRepository_Administration_NotFound, 0, sizeof (ImplementationRepository::Administration::NotFound)); CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_NotFound = &_tc_TAO_tc_ImplementationRepository_Administration_NotFound; +CORBA::TypeCode_ptr +ImplementationRepository::Administration::NotFound::_type (void) const +{ + return _tc_NotFound; +} + void ImplementationRepository::Administration::activate_server ( const char * server, CORBA::Environment &ACE_TRY_ENV diff --git a/TAO/tao/ImplRepoC.h b/TAO/tao/ImplRepoC.h index 500d032a6cd..c1335c7b3e0 100644 --- a/TAO/tao/ImplRepoC.h +++ b/TAO/tao/ImplRepoC.h @@ -975,6 +975,7 @@ public: // = TAO extension static CORBA::Exception *_alloc (void); + virtual CORBA::TypeCode_ptr _type (void) const; }; // exception ImplementationRepository::Administration::AlreadyRegistered @@ -1016,6 +1017,7 @@ public: // = TAO extension static CORBA::Exception *_alloc (void); + virtual CORBA::TypeCode_ptr _type (void) const; }; // exception ImplementationRepository::Administration::CannotActivate @@ -1052,6 +1054,7 @@ public: // = TAO extension static CORBA::Exception *_alloc (void); + virtual CORBA::TypeCode_ptr _type (void) const; }; // exception ImplementationRepository::Administration::NotFound diff --git a/TAO/tao/InconsistentTypeCodeC.cpp b/TAO/tao/InconsistentTypeCodeC.cpp index 05b7f791572..42372c4c2dc 100644 --- a/TAO/tao/InconsistentTypeCodeC.cpp +++ b/TAO/tao/InconsistentTypeCodeC.cpp @@ -32,7 +32,7 @@ ACE_RCSID(tao, InconsistentTypeCodeC, "$Id$") // default constructor CORBA_ORB_InconsistentTypeCode::CORBA_ORB_InconsistentTypeCode (void) - : CORBA_UserException (CORBA::ORB::_tc_InconsistentTypeCode) + : CORBA_UserException ("IDL:omg.org/CORBA/ORB/InconsistentTypeCode:1.0") { } @@ -45,7 +45,7 @@ CORBA_ORB_InconsistentTypeCode::~CORBA_ORB_InconsistentTypeCode (void) CORBA_ORB_InconsistentTypeCode::CORBA_ORB_InconsistentTypeCode ( const CORBA_ORB_InconsistentTypeCode &_tao_excp ) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 5746a8c9f5b..6cd245ea3c7 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -91,7 +91,7 @@ CORBA::Boolean operator>> (TAO_InputCDR &, } CORBA_ORB::InvalidName::InvalidName (void) - : CORBA_UserException (CORBA::ORB::_tc_InvalidName) + : CORBA_UserException ("IDL:omg.org/CORBA/ORB/InvalidName:1.0") { } @@ -100,7 +100,7 @@ CORBA::ORB::InvalidName::~InvalidName (void) } CORBA::ORB::InvalidName::InvalidName (const CORBA::ORB::InvalidName &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp index ff56d0e9633..182e3d9f9b4 100644 --- a/TAO/tao/PolicyC.cpp +++ b/TAO/tao/PolicyC.cpp @@ -43,7 +43,7 @@ TAO_NAMESPACE_END // default constructor CORBA_PolicyError::CORBA_PolicyError (void) - : CORBA_UserException (::_tc_CORBA_PolicyError) + : CORBA_UserException ("IDL:omg.org/CORBA/PolicyError:1.0") { } @@ -60,7 +60,7 @@ void CORBA_PolicyError::_tao_any_destructor (void *x) // copy constructor CORBA_PolicyError::CORBA_PolicyError (const ::CORBA_PolicyError &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { this->reason = _tao_excp.reason; } @@ -122,7 +122,7 @@ CORBA::Exception *CORBA_PolicyError::_alloc (void) CORBA_PolicyError::CORBA_PolicyError ( CORBA::PolicyErrorCode _tao_reason ) - : CORBA_UserException (CORBA::TypeCode::_duplicate (_tc_CORBA_PolicyError)) + : CORBA_UserException (CORBA::string_dup ("IDL:omg.org/CORBA/PolicyError:1.0")) { this->reason = _tao_reason; } @@ -146,6 +146,12 @@ static const CORBA::Long _oc_CORBA_PolicyError[] = static CORBA::TypeCode _tc_TAO_tc_CORBA_PolicyError (CORBA::tk_except, sizeof (_oc_CORBA_PolicyError), (char *) &_oc_CORBA_PolicyError, 0, sizeof (CORBA_PolicyError)); CORBA::TypeCode_ptr _tc_CORBA_PolicyError = &_tc_TAO_tc_CORBA_PolicyError; +CORBA::TypeCode_ptr +CORBA_PolicyError::_type (void) const +{ + return _tc_CORBA_PolicyError; +} + #if !defined (TAO_USE_SEQUENCE_TEMPLATES) @@ -244,7 +250,7 @@ void CORBA_InvalidPolicies::_tao_seq_UShort::_tao_any_destructor (void *x) // default constructor CORBA_InvalidPolicies::CORBA_InvalidPolicies (void) - : CORBA_UserException (::_tc_CORBA_InvalidPolicies) + : CORBA_UserException ("IDL:omg.org/CORBA/InvalidPolicies:1.0") { } @@ -261,7 +267,7 @@ void CORBA_InvalidPolicies::_tao_any_destructor (void *x) // copy constructor CORBA_InvalidPolicies::CORBA_InvalidPolicies (const ::CORBA_InvalidPolicies &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { this->indices = _tao_excp.indices; } @@ -323,7 +329,7 @@ CORBA::Exception *CORBA_InvalidPolicies::_alloc (void) CORBA_InvalidPolicies::CORBA_InvalidPolicies ( const CORBA_InvalidPolicies::_tao_seq_UShort & _tao_indices ) - : CORBA_UserException (CORBA::TypeCode::_duplicate (_tc_CORBA_InvalidPolicies)) + : CORBA_UserException (CORBA::string_dup ("IDL:omg.org/CORBA/InvalidPolicies:1.0")) { this->indices = _tao_indices; } @@ -346,6 +352,11 @@ static const CORBA::Long _oc_CORBA_InvalidPolicies[] = static CORBA::TypeCode _tc_TAO_tc_CORBA_InvalidPolicies (CORBA::tk_except, sizeof (_oc_CORBA_InvalidPolicies), (char *) &_oc_CORBA_InvalidPolicies, 0, sizeof (CORBA_InvalidPolicies)); CORBA::TypeCode_ptr _tc_CORBA_InvalidPolicies = &_tc_TAO_tc_CORBA_InvalidPolicies; +CORBA::TypeCode_ptr +CORBA_InvalidPolicies::_type (void) const +{ + return _tc_CORBA_InvalidPolicies; +} // default constructor CORBA_Policy::CORBA_Policy (void) diff --git a/TAO/tao/PolicyC.h b/TAO/tao/PolicyC.h index b068af1cdfb..8f5c30ae0c8 100644 --- a/TAO/tao/PolicyC.h +++ b/TAO/tao/PolicyC.h @@ -80,6 +80,7 @@ CORBA_PolicyError ( // = TAO extension static CORBA::Exception *_alloc (void); +virtual CORBA::TypeCode_ptr _type (void) const; }; // exception CORBA_PolicyError @@ -275,6 +276,7 @@ private: // = TAO extension static CORBA::Exception *_alloc (void); + virtual CORBA::TypeCode_ptr _type (void) const; }; // exception CORBA_InvalidPolicies diff --git a/TAO/tao/PollableC.cpp b/TAO/tao/PollableC.cpp index b888e884815..e85807188e6 100644 --- a/TAO/tao/PollableC.cpp +++ b/TAO/tao/PollableC.cpp @@ -202,7 +202,7 @@ CORBA_PollableSet::NoPossiblePollable::~NoPossiblePollable (void) // copy constructor CORBA_PollableSet::NoPossiblePollable::NoPossiblePollable (const ::CORBA_PollableSet::NoPossiblePollable &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } @@ -267,7 +267,7 @@ CORBA_PollableSet::UnknownPollable::~UnknownPollable (void) // copy constructor CORBA_PollableSet::UnknownPollable::UnknownPollable (const ::CORBA_PollableSet::UnknownPollable &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } diff --git a/TAO/tao/PortableServerC.cpp b/TAO/tao/PortableServerC.cpp index bdb2870e230..daf9be00022 100644 --- a/TAO/tao/PortableServerC.cpp +++ b/TAO/tao/PortableServerC.cpp @@ -216,7 +216,7 @@ TAO_NAMESPACE_END // default constructor PortableServer::ForwardRequest::ForwardRequest (void) - : CORBA_UserException (::PortableServer::_tc_ForwardRequest) + : CORBA_UserException ("IDL:PortableServer/ForwardRequest:1.0") { } @@ -233,7 +233,7 @@ void PortableServer::ForwardRequest::_tao_any_destructor (void *x) // copy constructor PortableServer::ForwardRequest::ForwardRequest (const ::PortableServer::ForwardRequest &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { this->forward_reference = CORBA::Object::_duplicate (_tao_excp.forward_reference.in ()); } @@ -295,7 +295,7 @@ CORBA::Exception *PortableServer::ForwardRequest::_alloc (void) PortableServer::ForwardRequest::ForwardRequest ( const CORBA::Object_ptr _tao_forward_reference ) - : CORBA_UserException (CORBA::TypeCode::_duplicate (PortableServer::_tc_ForwardRequest)) + : CORBA_UserException (CORBA::string_dup ("IDL:PortableServer/ForwardRequest:1.0")) { this->forward_reference = CORBA::Object::_duplicate (_tao_forward_reference); } @@ -320,6 +320,12 @@ TAO_NAMESPACE_BEGIN (PortableServer) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ForwardRequest, &_tc_TAO_tc_PortableServer_ForwardRequest) TAO_NAMESPACE_END +CORBA::TypeCode_ptr +PortableServer::ForwardRequest::_type (void) const +{ + return _tc_ForwardRequest; +} + #endif /* TAO_HAS_MINIMUM_CORBA == 0 */ TAO_NAMESPACE_TYPE (const CORBA::ULong) @@ -1121,9 +1127,9 @@ void PortableServer::POAManager::AdapterInactive::_tao_decode ( // copy constructor PortableServer::POAManager::AdapterInactive::AdapterInactive (const ::PortableServer::POAManager::AdapterInactive &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POAManager::AdapterInactive& @@ -1508,9 +1514,9 @@ PortableServer::POA::AdapterAlreadyExists::~AdapterAlreadyExists (void) // copy constructor PortableServer::POA::AdapterAlreadyExists::AdapterAlreadyExists (const ::PortableServer::POA::AdapterAlreadyExists &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::AdapterAlreadyExists& @@ -1573,9 +1579,9 @@ PortableServer::POA::AdapterNonExistent::~AdapterNonExistent (void) // copy constructor PortableServer::POA::AdapterNonExistent::AdapterNonExistent (const ::PortableServer::POA::AdapterNonExistent &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::AdapterNonExistent& @@ -1638,7 +1644,7 @@ PortableServer::POA::InvalidPolicy::~InvalidPolicy (void) // copy constructor PortableServer::POA::InvalidPolicy::InvalidPolicy (const ::PortableServer::POA::InvalidPolicy &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { this->index = _tao_excp.index; } @@ -1714,9 +1720,9 @@ PortableServer::POA::NoServant::~NoServant (void) // copy constructor PortableServer::POA::NoServant::NoServant (const ::PortableServer::POA::NoServant &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::NoServant& @@ -1781,9 +1787,9 @@ PortableServer::POA::ObjectAlreadyActive::~ObjectAlreadyActive (void) // copy constructor PortableServer::POA::ObjectAlreadyActive::ObjectAlreadyActive (const ::PortableServer::POA::ObjectAlreadyActive &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::ObjectAlreadyActive& @@ -1846,9 +1852,9 @@ PortableServer::POA::ObjectNotActive::~ObjectNotActive (void) // copy constructor PortableServer::POA::ObjectNotActive::ObjectNotActive (const ::PortableServer::POA::ObjectNotActive &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::ObjectNotActive& @@ -1911,9 +1917,9 @@ PortableServer::POA::ServantAlreadyActive::~ServantAlreadyActive (void) // copy constructor PortableServer::POA::ServantAlreadyActive::ServantAlreadyActive (const ::PortableServer::POA::ServantAlreadyActive &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::ServantAlreadyActive& @@ -1976,9 +1982,9 @@ PortableServer::POA::ServantNotActive::~ServantNotActive (void) // copy constructor PortableServer::POA::ServantNotActive::ServantNotActive (const ::PortableServer::POA::ServantNotActive &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::ServantNotActive& @@ -2041,9 +2047,9 @@ PortableServer::POA::WrongAdapter::~WrongAdapter (void) // copy constructor PortableServer::POA::WrongAdapter::WrongAdapter (const ::PortableServer::POA::WrongAdapter &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::WrongAdapter& @@ -2106,9 +2112,9 @@ PortableServer::POA::WrongPolicy::~WrongPolicy (void) // copy constructor PortableServer::POA::WrongPolicy::WrongPolicy (const ::PortableServer::POA::WrongPolicy &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::POA::WrongPolicy& @@ -2239,9 +2245,9 @@ PortableServer::Current::NoContext::~NoContext (void) // copy constructor PortableServer::Current::NoContext::NoContext (const ::PortableServer::Current::NoContext &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator PortableServer::Current::NoContext& diff --git a/TAO/tao/PortableServerC.h b/TAO/tao/PortableServerC.h index 2d789beb07f..ed279190d9d 100644 --- a/TAO/tao/PortableServerC.h +++ b/TAO/tao/PortableServerC.h @@ -432,6 +432,7 @@ typedef POA *POA_ptr; // = TAO extension static CORBA::Exception *_alloc (void); + virtual CORBA::TypeCode_ptr _type (void) const; }; // exception PortableServer::ForwardRequest diff --git a/TAO/tao/RTCORBAC.cpp b/TAO/tao/RTCORBAC.cpp index 26201311722..102651dae63 100644 --- a/TAO/tao/RTCORBAC.cpp +++ b/TAO/tao/RTCORBAC.cpp @@ -1362,9 +1362,9 @@ RTCORBA::RTORB::InvalidThreadpool::~InvalidThreadpool (void) // copy constructor RTCORBA::RTORB::InvalidThreadpool::InvalidThreadpool (const ::RTCORBA::RTORB::InvalidThreadpool &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { - } +} // assignment operator RTCORBA::RTORB::InvalidThreadpool& diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp index 44518a63497..4f9569a43eb 100644 --- a/TAO/tao/Typecode.cpp +++ b/TAO/tao/Typecode.cpp @@ -27,7 +27,7 @@ ACE_RCSID(tao, Typecode, "$Id$") CORBA_TypeCode::Bounds::Bounds (void) - : CORBA_UserException (CORBA::TypeCode::_tc_Bounds) + : CORBA_UserException ("IDL:omg.orb/CORBA/TypeCode/Bounds:1.0") { } @@ -69,7 +69,7 @@ CORBA_TypeCode::Bounds::_is_a (const char* interface_id) const } CORBA_TypeCode::BadKind::BadKind (void) - : CORBA_UserException (CORBA::TypeCode::_tc_BadKind) + : CORBA_UserException ("IDL:omg.orb/CORBA/TypeCode/BadKind:1.0") { } diff --git a/TAO/tao/WrongTransactionC.cpp b/TAO/tao/WrongTransactionC.cpp index 9615e75158d..1106611d560 100644 --- a/TAO/tao/WrongTransactionC.cpp +++ b/TAO/tao/WrongTransactionC.cpp @@ -16,7 +16,7 @@ // default constructor CORBA_WrongTransaction::CORBA_WrongTransaction (void) - : CORBA_UserException (CORBA::_tc_WrongTransaction) + : CORBA_UserException ("IDL:omg.org/CORBA/WrongTransaction:1.0") { } @@ -27,7 +27,7 @@ CORBA_WrongTransaction::~CORBA_WrongTransaction (void) // copy constructor CORBA_WrongTransaction::CORBA_WrongTransaction (const CORBA_WrongTransaction &_tao_excp) - : CORBA_UserException (_tao_excp._type ()) + : CORBA_UserException (_tao_excp._id ()) { } |