[omniORB] CORBA::Exception::_name() ?
Bruce Fountain
fountainb@switch.aust.com
Wed Aug 7 02:22:01 2002
On Tuesday 06 August 2002 21:09, Guy Trudel wrote:
> In omniOrb 2.8, I'm using NP_RepositoryId(). Does it exist in omniORB 3 ?
>
> catch( CORBA::SystemException& exceptionSystem )
> {
> printf( "%s \n", exceptionSystem.NP_RepositoryId() );
> }
The only really portable way I know to convert an exception
to a string is to insert it into an Any and then extract the
typecode name:
catch (CORBA::SystemException& ex)
{
CORBA::Any any;
any <<= ex;
CORBA::TypeCode_var tc = any.type();
std::string result = tc->name();
...
The name is terse, but sufficient.
--
Bruce Fountain (fountainb@switch.aust.com)
Senior Software Engineer
Union Switch and Signal Pty Ltd
Perth Western Australia
tel: +618 9256 0083