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

Martin Hellebrandt Martin.Hellebrandt@t-mobile.de
Thu Jan 23 13:52:02 2003


Hi!

The backtrace shows that some sort of uncaught/unexpected exception is
thrown. A bunch of catch()-blocks might help, to figure out, of which
type it is.

I use the following code for the same purpose:

//----- cut here
namespace CORBA {

// Copied from Henning/Vinoski, p. 320
std::ostream& operator<<(std::ostream& str, const CORBA::Exception &e)
{
    CORBA::Any tmp;
    tmp <<= e;
    CORBA::TypeCode_var tc = tmp.type();
    const char *p = tc->name();
    if (*p != 0)
	str << p;
    else
        str << tc->id();
    return str;
}

}
//----- cut here

When I need it as a  std::string, I use boost::lexical_cast.

Cheers,

Martin


On Thu, 2003-01-23 at 14:12, Matej Kenda wrote:
> 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
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
-- 
Martin Hellebrandt <Martin.Hellebrandt@t-mobile.de>