#include <ExceptionHolder_i.h>


Public Member Functions | |
| ExceptionHolder (void) | |
| ExceptionHolder (::CORBA::Boolean is_system_exception,::CORBA::Boolean byte_order, const ::CORBA::OctetSeq &marshaled_exception,::TAO::Exception_Data *data,::CORBA::ULong exceptions_count, ACE_Char_Codeset_Translator *char_translator, ACE_WChar_Codeset_Translator *wchar_translator) | |
| void | set_exception_data (::TAO::Exception_Data *data,::CORBA::ULong exceptions_count) |
| virtual void | raise_exception (void) |
| virtual void | raise_exception_with_list (const ::Dynamic::ExceptionList &exc_list) |
| virtual CORBA::ValueBase * | _copy_value (void) |
Protected Member Functions | |
| virtual | ~ExceptionHolder (void) |
Private Attributes | |
| TAO::Exception_Data * | data_ |
| CORBA::ULong | count_ |
| ACE_Char_Codeset_Translator * | char_translator_ |
| ACE_WChar_Codeset_Translator * | wchar_translator_ |
Definition at line 45 of file ExceptionHolder_i.h.
| TAO::ExceptionHolder::ExceptionHolder | ( | void | ) |
Definition at line 6 of file ExceptionHolder_i.cpp.
: ExceptionHolder_i.cpp 88517 2010-01-13 08:54:34Z johnnyw $") #include "tao/Messaging/Messaging.h" #include "tao/Exception_Data.h" #include "tao/CDR.h"
| TAO::ExceptionHolder::ExceptionHolder | ( | ::CORBA::Boolean | is_system_exception, | |
| ::CORBA::Boolean | byte_order, | |||
| const ::CORBA::OctetSeq & | marshaled_exception, | |||
| ::TAO::Exception_Data * | data, | |||
| ::CORBA::ULong | exceptions_count, | |||
| ACE_Char_Codeset_Translator * | char_translator, | |||
| ACE_WChar_Codeset_Translator * | wchar_translator | |||
| ) |
Definition at line 14 of file ExceptionHolder_i.cpp.
{
ExceptionHolder::ExceptionHolder (void) :
data_ (0),
count_ (0),
char_translator_ (0),
wchar_translator_ (0)
{
}
ExceptionHolder::ExceptionHolder (
::CORBA::Boolean is_system_exception,
::CORBA::Boolean byte_order,
| TAO::ExceptionHolder::~ExceptionHolder | ( | void | ) | [protected, virtual] |
Definition at line 30 of file ExceptionHolder_i.cpp.
:
::OBV_Messaging::ExceptionHolder (is_system_exception, byte_order, marshaled_exception),
| CORBA::ValueBase * TAO::ExceptionHolder::_copy_value | ( | void | ) | [virtual] |
Definition at line 133 of file ExceptionHolder_i.cpp.
{
// todo convert exceptionlist to something we can really use.
this->raise_exception ();
}
CORBA::ValueBase*
ExceptionHolder::_copy_value (void)
{
TAO::ExceptionHolder* ret_val = 0;
ACE_NEW_THROW_EX (ret_val,
| void TAO::ExceptionHolder::raise_exception | ( | void | ) | [virtual] |
Definition at line 42 of file ExceptionHolder_i.cpp.
{
}
void
ExceptionHolder::set_exception_data (::TAO::Exception_Data* data,
::CORBA::ULong exceptions_count)
{
this->data_ = data;
this->count_ = exceptions_count;
}
void ExceptionHolder::raise_exception (void)
{
TAO_InputCDR _tao_in ((const char*) this->marshaled_exception ().get_buffer (),
this->marshaled_exception ().length (),
this->byte_order ());
_tao_in.char_translator (this->char_translator_);
_tao_in.wchar_translator (this->wchar_translator_);
CORBA::String_var type_id;
if (!(_tao_in >> type_id.inout ()))
{
// Could not demarshal the exception id, raise a local
// CORBA::MARSHAL
throw ::CORBA::MARSHAL (TAO::VMCID, CORBA::COMPLETED_YES);
}
if (this->is_system_exception ())
{
CORBA::ULong minor = 0;
CORBA::ULong completion = 0;
if (!(_tao_in >> minor) ||
!(_tao_in >> completion))
{
throw ::CORBA::MARSHAL (TAO::VMCID, CORBA::COMPLETED_MAYBE);
}
CORBA::SystemException* exception =
TAO::create_system_exception (type_id.in ());
if (!exception)
{
// @@ We should raise a CORBA::NO_MEMORY, but we ran out
// of memory already. We need a pre-allocated, TSS,
// CORBA::NO_MEMORY instance
ACE_NEW (exception, CORBA::UNKNOWN);
}
exception->minor (minor);
exception->completed (CORBA::CompletionStatus (completion));
// Raise the exception.
ACE_Auto_Basic_Ptr<CORBA::SystemException> e_ptr(exception);
exception->_raise ();
return;
}
// Match the exception interface repository id with the
// exception in the exception list.
// This is important to decode the exception.
for (CORBA::ULong i = 0; i != this->count_; ++i)
{
if (ACE_OS::strcmp (type_id.in (), this->data_[i].id) != 0)
continue;
CORBA::Exception * const exception = this->data_[i].alloc ();
if (exception == 0)
{
throw ::CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_YES);
}
else
{
exception->_tao_decode (_tao_in);
}
// Raise the exception.
ACE_Auto_Basic_Ptr<CORBA::Exception> e_ptr (exception);
exception->_raise ();
| void TAO::ExceptionHolder::raise_exception_with_list | ( | const ::Dynamic::ExceptionList & | exc_list | ) | [virtual] |
Definition at line 125 of file ExceptionHolder_i.cpp.
| void TAO::ExceptionHolder::set_exception_data | ( | ::TAO::Exception_Data * | data, | |
| ::CORBA::ULong | exceptions_count | |||
| ) |
Definition at line 35 of file ExceptionHolder_i.cpp.
{
}
ACE_Char_Codeset_Translator* TAO::ExceptionHolder::char_translator_ [private] |
Definition at line 78 of file ExceptionHolder_i.h.
CORBA::ULong TAO::ExceptionHolder::count_ [private] |
Definition at line 77 of file ExceptionHolder_i.h.
TAO::Exception_Data* TAO::ExceptionHolder::data_ [private] |
Definition at line 76 of file ExceptionHolder_i.h.
ACE_WChar_Codeset_Translator* TAO::ExceptionHolder::wchar_translator_ [private] |
Definition at line 79 of file ExceptionHolder_i.h.
1.7.0