[omniORB] how to catch COMM_FAILURE exception

Aida Fátima Cano aida.cano at gmail.com
Tue Feb 6 12:48:19 GMT 2007


I have the following code: A Client sends a request to a server (Method_1);
then, this server, workins as a client, makes a request to another Server.

Why the application, in debug mode, doesn't reach the catch statments If,
while waiting method_2 to return, TCP communications fail?


CORBA::Boolean CDT_CS_Request_i::Method_1()
{
    try
    {
       CCS_DT_Request cesionRequestObj();
       aceptado = cesionRequestObj.Method_2();
    }
    catch(CORBA::COMM_FAILURE& ex)
    {
      cerr << "Caught CORBA::COMM" << endl;
      return false;
   }
   catch(CORBA::SystemException&)
   {
       cerr << "Caught CORBA::SystemException." << endl;
       return false;
   }
   catch(CORBA::Exception&) {
      cerr << "Caught CORBA::Exception." << endl;
      return false;
  }
  catch(omniORB::fatalException& fe) {
     cerr << "Caught omniORB::fatalException:" << endl;
     return false;
  }
  catch (...)
  {
  }

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070206/d9a43452/attachment.htm


More information about the omniORB-list mailing list