[omniORB] "Unexpected" exception at initialization
Chris Newbold
chris.newbold@laurelnetworks.com
Wed, 09 Aug 2000 12:57:11 -0400
We're using omniORB 3.0, patched up through bug #11. A frequent user
error for us is to specifity a port with -ORBpoa_iiop_port which
happens to already be in use. When this happens, we get an "unexpected"
exception when attempting to activate the root POA. I found this
odd at first, since initialization is trapped it a try...catch which
catches CORBA::Exception and omniORB::fatalException.
After poking around a little, I found that an exception of type
omniConnectionBroken is thrown when the incoming rope cannot open
the specified socket. However, omniConnectionBroken is neither a
CORBA execption nor an omniORB::fatalException.
At the very least, this is rather annoying, since omniConnectionBroken
is not documented. However, it also seems to violate the specified list
of
exceptions for POAManager::activate.
>From tcpSocketMtFactory.cc:
tcpSocketIncomingRope::tcpSocketIncomingRope(...):
if ((pd_rendezvous = socket(INETSOCKET,SOCK_STREAM,0)) ==
RC_INVALID_SOCKET) {
# ifndef __WIN32__
OMNIORB_THROW_CONNECTION_BROKEN(errno,CORBA::COMPLETED_NO);
# else
OMNIORB_THROW_CONNECTION_BROKEN(::WSAGetLastError(),CORBA::COMPLETED_NO);
# endif
}
>From exceptiondefs.h:
class omniConnectionBroken {
public:
inline omniConnectionBroken(CORBA::ULong m, CORBA::CompletionStatus c)
: pd_minor(m), pd_status(c) {}
inline CORBA::ULong minor() const { return pd_minor; }
inline CORBA::CompletionStatus completed() const { return pd_status; }
private:
CORBA::ULong pd_minor;
CORBA::CompletionStatus pd_status;
};
-Chris Newbold