// Custom includes
#include <sys/socket.h>
#include <sys/types.h>
-#include "Utils/Exception.hh"
+#include "../../Utils/Exception.hh"
//#include "GenericAddressingPolicy.mpp"
#define prefix_
unsigned len)
{
if (::getsockname(handle.fd(),addr,&len) < 0)
- throw SystemException(errno);
+ throwErrno();
}
prefix_ void senf::GenericAddressingPolicy_Base::do_peer(FileHandle handle,
unsigned len)
{
if (::getpeername(handle.fd(),addr,&len) < 0)
- throw SystemException(errno);
+ throwErrno();
}
prefix_ void senf::GenericAddressingPolicy_Base::do_bind(FileHandle handle,
unsigned len)
{
if (::bind(handle.fd(),addr,len) < 0)
- throw SystemException(errno);
+ throwErrno();
}
prefix_ void senf::GenericAddressingPolicy_Base::do_connect(FileHandle handle,
int err = 0;
socklen_t len = sizeof(err);
if (::getsockopt(handle.fd(),SOL_SOCKET,SO_ERROR,&err,&len) < 0)
- throw SystemException(errno);
+ throwErrno();
if (err != 0)
- throw SystemException(err);
+ throwErrno(err);
return;
}
case EINTR:
break;
default:
- throw SystemException(errno);
+ throwErrno();
}
else
return;