[omniORB] Getting something out of an exception

Huw Rogers count0@building2.co.jp
Tue, 11 Sep 2001 16:53:59 +0900


This gives you the most derived exception name,
and unlike other suggestions it is portable.

	-Huw

char *exceptionName(const CORBA::Exception &e)
{
  CORBA::Any a;

  a <<= e;

  CORBA::TypeCode_var tc(a.type());

  return(CORBA::string_dup(tc->name()));
}

"ERIKSSON,TOBIAS (A-Sweden,ex1)" wrote:
> 
> Hi
>  I'm receiving a CORBA::SystemException but I do not know why, isn't there
> any variable that can give me some hint on what wet wrong?
> 
>  Regards
>   Tobias