try {
...
}
catch (CORBA::SystemException& se) {
...
}
catch (CORBA::Exception& ex) {
CORBA::UnknownUserException* user_ex =
CORBA::UnknownUserException::_downcast(&ex);
CORBA::Any exceptionAny = user_ex->exception();
cerr << "Exception repository Id is " << exceptionAny.type()->id()
<< ", name is " << exceptionAny.type()->name() << endl;
...
}
Here I can get the exception repo ID like "IDL:myModule/
NotFoundException:1.0", but how to get the scope name of this
exception? i.e, myModule::NotFoundException? I am using TAO.
Thanks.
Did you face any issues while using that way?
regards,
Jack
No any issue. Actually I'm migrating from Orbix to TAO. Previously,
the API CORBA::Exception::id() was used to get scope name of an
exception. But it seems that TAO doesn't support this method. I'd like
to know if I can keep code's behavior unchanged after migrating to
TAO.
Thanks.
LJ
Please send all questions related to TAO to the TAO mailing list or
ACE+TAO newsgroup rather than comp.object.corba since that's where the
TAO users congregate. See
http://www.cs.wustl.edu/~schmidt/TAO-mail.html
for more info on how to access these resources.
Thanks,
Doug
>On Dec 22, 7:12=A0pm, Jack <Jack.But...@invariantlogic.com> wrote:
>> On Dec 22, 1:21=A0pm, LJ <lingjie.m...@gmail.com> wrote:
>>
>>
>>
>> > I have the following code:
>>
>> > try {
>> > =A0 =A0...}
>>
>> > catch (CORBA::SystemException& se) {
>> > =A0 ...}
>>
>> > catch (CORBA::Exception& ex) {
>> > =A0 =A0 CORBA::UnknownUserException* user_ex =3D
>> > CORBA::UnknownUserException::_downcast(&ex);
>> > =A0 =A0 CORBA::Any exceptionAny =3D user_ex->exception();
>>
>> > =A0 =A0 cerr << "Exception repository Id is " << exceptionAny.type()->i=
>d()
>> > << ", name is " << exceptionAny.type()->name() << endl;
>> > =A0 =A0 ...
>>
>> > }
>>
>> > Here I can get the exception repo ID like "IDL:myModule/
>> > NotFoundException:1.0", but how to get the scope name of this
>> > exception? i.e, myModule::NotFoundException? I am using TAO.
>>
>> > Thanks.
>>
>> Did you face any issues while using that way?
>>
>> regards,
>> Jack
>
>No any issue. Actually I'm migrating from Orbix to TAO. Previously,
>the API CORBA::Exception::id() was used to get scope name of an
>exception. But it seems that TAO doesn't support this method. I'd like
>to know if I can keep code's behavior unchanged after migrating to
>TAO.
>
>Thanks.
>LJ
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.sc...@vanderbilt.edu
Please send all questions related to TAO to the TAO mailing list or
ACE+TAO newsgroup rather than comp.object.corba since that's where the
TAO users congregate. See
http://www.cs.wustl.edu/~schmidt/TAO-mail.html
for more info on how to access these resources.
Thanks,
Doug
>On Dec 22, 7:12=A0pm, Jack <Jack.But...@invariantlogic.com> wrote:
>> On Dec 22, 1:21=A0pm, LJ <lingjie.m...@gmail.com> wrote:
>>
>>
>>
>> > I have the following code:
>>
>> > try {
>> > =A0 =A0...}
>>
>> > catch (CORBA::SystemException& se) {
>> > =A0 ...}
>>
>> > catch (CORBA::Exception& ex) {
>> > =A0 =A0 CORBA::UnknownUserException* user_ex =3D
>> > CORBA::UnknownUserException::_downcast(&ex);
>> > =A0 =A0 CORBA::Any exceptionAny =3D user_ex->exception();
>>
>> > =A0 =A0 cerr << "Exception repository Id is " << exceptionAny.type()->i=
>d()
>> > << ", name is " << exceptionAny.type()->name() << endl;
>> > =A0 =A0 ...
>>
>> > }
>>
>> > Here I can get the exception repo ID like "IDL:myModule/
>> > NotFoundException:1.0", but how to get the scope name of this
>> > exception? i.e, myModule::NotFoundException? I am using TAO.
>>
>> > Thanks.
>>
>> Did you face any issues while using that way?
>>
>> regards,
>> Jack
>
>No any issue. Actually I'm migrating from Orbix to TAO. Previously,
>the API CORBA::Exception::id() was used to get scope name of an
>exception. But it seems that TAO doesn't support this method. I'd like
>to know if I can keep code's behavior unchanged after migrating to
>TAO.
>
>Thanks.
>LJ
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.sc...@vanderbilt.edu
_______________________________________________
tao-users mailing list
tao-...@list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/tao-users
> No any issue. Actually I'm migrating from Orbix to TAO. Previously,
> the API CORBA::Exception::id() was used to get scope name of an
> exception. But it seems that TAO doesn't support this method. I'd like
> to know if I can keep code's behavior unchanged after migrating to
> TAO.
The id() method is not part of the CORBA spec, it is a vendor specific
addition, so that is why TAO doesn't support it.
Johnny
Naturally, if someone wants to add this capability to TAO (or sponsor
someone to add this capability to TAO) that's another option, as well.
Thanks,
Doug
>>The id() method is not part of the CORBA spec, it is a vendor specific
>>addition, so that is why TAO doesn't support it.
>
> Naturally, if someone wants to add this capability to TAO (or sponsor
> someone to add this capability to TAO) that's another option, as well.
This then has to be reported to the OMG as issue first, that way this could
be standardized.
Johnny
It's already there. The standard way to get the repository ID of an
exception is by calling CORBA::Exception::_rep_id().
--
Jon Biggar
j...@floorboard.com
j...@biggar.org
jonb...@gmail.com
> It's already there. The standard way to get the repository ID of an
> exception is by calling CORBA::Exception::_rep_id().
BTW, I hear on good authority that TAO supports this method, so I
recommend the person who was using the non-standard Orbix id() method
give the standard TAO _rep_id() method a shot.