 |
|
| Computers Forum Index » Computer - Object (Corba) » How to get the scope name of an exception?... |
|
Page 1 of 1 |
|
| Author |
Message |
| LJ... |
Posted: Mon Dec 22, 2008 8:21 am |
|
|
|
Guest
|
I have the following code:
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. |
|
|
| Back to top |
|
|
|
| Jack... |
Posted: Mon Dec 22, 2008 11:12 am |
|
|
|
Guest
|
On Dec 22, 1:21 pm, LJ <lingjie.m... at (no spam) gmail.com> wrote:
Quote: I have the following code:
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 |
|
|
| Back to top |
|
|
|
| LJ... |
Posted: Tue Dec 23, 2008 2:25 am |
|
|
|
Guest
|
On Dec 22, 7:12 pm, Jack <Jack.But... at (no spam) invariantlogic.com> wrote:
Quote: On Dec 22, 1:21 pm, LJ <lingjie.m... at (no spam) gmail.com> wrote:
I have the following code:
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 |
|
|
| Back to top |
|
|
|
| Douglas C. Schmidt... |
Posted: Tue Dec 23, 2008 2:44 am |
|
|
|
Guest
|
Hi,
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
Quote: On Dec 22, 7:12=A0pm, Jack <Jack.But... at (no spam) invariantlogic.com> wrote:
On Dec 22, 1:21=A0pm, LJ <lingjie.m... at (no spam) 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.schmidt at (no spam) vanderbilt.edu |
|
|
| Back to top |
|
|
|
| Douglas C. Schmidt... |
Posted: Tue Dec 23, 2008 2:45 am |
|
|
|
Guest
|
Hi,
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
Quote: On Dec 22, 7:12=A0pm, Jack <Jack.But... at (no spam) invariantlogic.com> wrote:
On Dec 22, 1:21=A0pm, LJ <lingjie.m... at (no spam) 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.schmidt at (no spam) vanderbilt.edu
_______________________________________________
tao-users mailing list
tao-users at (no spam) list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/tao-users
--
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.schmidt at (no spam) vanderbilt.edu |
|
|
| Back to top |
|
|
|
| Johnny Willemsen... |
Posted: Tue Dec 23, 2008 2:02 pm |
|
|
|
Guest
|
Hi,
Quote: 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 |
|
|
| Back to top |
|
|
|
| Douglas C. Schmidt... |
Posted: Tue Dec 23, 2008 2:58 pm |
|
|
|
Guest
|
Hi folks,
Quote: 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.
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
--
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.schmidt at (no spam) vanderbilt.edu |
|
|
| Back to top |
|
|
|
| Johnny Willemsen... |
Posted: Tue Dec 23, 2008 9:13 pm |
|
|
|
Guest
|
Hi,
Quote: 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 |
|
|
| Back to top |
|
|
|
| Jon Biggar... |
Posted: Wed Dec 24, 2008 10:02 pm |
|
|
|
Guest
|
Johnny Willemsen wrote:
Quote: Hi,
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.
It's already there. The standard way to get the repository ID of an
exception is by calling CORBA::Exception::_rep_id().
--
Jon Biggar
jon at (no spam) floorboard.com
jon at (no spam) biggar.org
jonbiggar at (no spam) gmail.com |
|
|
| Back to top |
|
|
|
| Douglas C. Schmidt... |
Posted: Thu Dec 25, 2008 11:45 pm |
|
|
|
Guest
|
Hi Folks,
Quote: 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.
Thanks,
Doug
--
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.schmidt at (no spam) vanderbilt.edu |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Mon Dec 07, 2009 1:42 am
|
|