[omniORB] unknown exception
Viktor Mikho
vvmikho@hotmail.com
Tue, 21 Nov 2000 00:25:05
Use smth like that
#define CTCH_REP_THROW(name) catch(name)\
{\
printf("Exception %s was thrown\r\n", #name);\
throw;\
}
#define CORBA_REPORT_EXC \
CTCH_REP_THROW (CORBA::UNKNOWN)\
CTCH_REP_THROW (CORBA::BAD_PARAM)\
CTCH_REP_THROW (CORBA::NO_MEMORY)\
CTCH_REP_THROW (CORBA::IMP_LIMIT)\
CTCH_REP_THROW (CORBA::COMM_FAILURE)\
CTCH_REP_THROW (CORBA::INV_OBJREF)\
CTCH_REP_THROW (CORBA::OBJECT_NOT_EXIST)\
CTCH_REP_THROW (CORBA::NO_PERMISSION)\
CTCH_REP_THROW (CORBA::INTERNAL)\
CTCH_REP_THROW (CORBA::MARSHAL)\
CTCH_REP_THROW (CORBA::INITIALIZE)\
CTCH_REP_THROW (CORBA::NO_IMPLEMENT)\
CTCH_REP_THROW (CORBA::BAD_TYPECODE)\
CTCH_REP_THROW (CORBA::BAD_OPERATION)\
CTCH_REP_THROW (CORBA::NO_RESOURCES)\
CTCH_REP_THROW (CORBA::NO_RESPONSE)\
CTCH_REP_THROW (CORBA::PERSIST_STORE)\
CTCH_REP_THROW (CORBA::BAD_INV_ORDER)\
CTCH_REP_THROW (CORBA::TRANSIENT)\
CTCH_REP_THROW (CORBA::FREE_MEM)\
CTCH_REP_THROW (CORBA::INV_IDENT)\
CTCH_REP_THROW (CORBA::INV_FLAG)\
CTCH_REP_THROW (CORBA::INTF_REPOS)\
CTCH_REP_THROW (CORBA::BAD_CONTEXT)\
CTCH_REP_THROW (CORBA::OBJ_ADAPTER)\
CTCH_REP_THROW (CORBA::DATA_CONVERSION)\
CTCH_REP_THROW (CORBA::TRANSACTION_REQUIRED)\
CTCH_REP_THROW (CORBA::TRANSACTION_ROLLEDBACK)\
CTCH_REP_THROW (CORBA::INVALID_TRANSACTION)\
CTCH_REP_THROW (CORBA::WRONG_TRANSACTION)
So in your code you say:
try
{
//do something
}
CORBA_REPORT_EXC
catch(CORBA::SystemException& se) {.....
Cheers
Viktor
>From: "Ilinykh, Andre" <AIlinykh@SECTORBASE.COM>
>To: omniorb-list@uk.research.att.com
>Subject: [omniORB] unknown exception
>Date: Mon, 20 Nov 2000 15:15:36 -0800
>
>
>Hi!
>My question is about "unknown exception". Every sample in omniORB hase code
>like that:
>
>try{
> //do something
>}
>catch(CORBA::SystemException& se) {
>
> int i;
>
> cerr << "Caught a CORBA::SystemException. " << se._NP_repoId(&i)<<
>endl;
>
>
>
> }
>
> catch(CORBA::Exception&) {
>
> cerr << "Caught CORBA::Exception." << endl;
>
> }
>
> catch(omniORB::fatalException& fe) {
>
> cerr << "Caught omniORB::fatalException:" << endl;
>
> cerr << " file: " << fe.file() << endl;
>
> cerr << " line: " << fe.line() << endl;
>
> cerr << " mesg: " << fe.errmsg() << endl;
>
> }
>
> catch(...) {
>
> cerr << "Caught unknown exception." << endl;
>
> }
>
>I catch unknown (...) exception here. What it can be? I used omniORB 2.8
>for
>Windows NT.
>Thank you,
> Andrey
>
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com