[omniORB] Error: function to insert the user exception into an Any is not available

Matej Kenda matejkenda@volja.net
Thu Jan 23 13:13:02 2003


Hi,

I have implemented a function to display the type of CORBA exception if 
caught. I assumed that the same function will be to display the type of user 
exception since it is derived from CORBA::Exception.

The implementation is very simple and based on an example from Henning & 
Vinoski: Advanced CORBA Programming:

string CORBAExceptionToString(const CORBA::Exception &a_exc) {

     string exText(ipc_corbaLiteral_c);
     exText.reserve(50);

     CORBA::Any anyTmp;
     anyTmp <<= a_exc;
     CORBA::TypeCode_var tc = anyTmp.type();
     const char* p = tc->name();

     if (*p != '\0') {
         exText += p;
     };
     exText += "#";
     exText += tc->id();

     return exText;
};

I use omniORB 4.0.0 on Linux.

Program aborts if user exception is passed to this function with the following 
error:

   omniORB: Error: function to insert the user exception into an Any is not
   available

Backtrace of the coredump (if helpful):

(gdb) bt
#0  0x42028cc1 in kill () from /lib/i686/libc.so.6
#1  0x402a207d in raise () from /lib/i686/libpthread.so.0
#2  0x4202a019 in abort () from /lib/i686/libc.so.6
#3  0x40247fb7 in __cxxabiv1::__terminate(void (*)()) (handler=0x42029e80 <abort>)
     at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x40248004 in std::terminate() () at 
../../../../libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x40248176 in __cxa_throw () at 
../../../../libstdc++-v3/libsupc++/eh_throw.cc:77
#6  0x403523f4 in omni::omniExHelper::INTERNAL(char const*, int, unsigned 
long, CORBA::CompletionStatus) ()
    from /opt/ivd/lib/libomniORB4.so.0
#7  0x4034abd0 in CORBA::SystemException::~SystemException() () from 
/opt/ivd/lib/libomniORB4.so.0
#8  0x89102454 in ?? ()
Cannot access memory at address 0x8b0cec83


Is this a bug or was my assumption wrong?

TIA,

Matej