[omniORB] Getting something out of an exception
Attila Pletyak
attila.pletyak@anemo.com
Tue, 11 Sep 2001 10:42:10 +0200
I've started to use this type of solution some time ago, when I first
read it on this list. But I've a question regarding this:
Can it be that with my User exception, defined in the interface, this
solution does not work? I used to get an omniORB exception on the order
of "Attempting to put a user exception in an Any failed." Should I
define the <<= operator for my exceptions for this solution to work?
Thanks in advance,
Attila Pletyak
Anemo Ltd.
Huw Rogers wrote:
>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
>>
>
>