X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FFileHandle.cc;h=7aa9e24fa986ff000442adf471e645c4669e7504;hb=74270969b7d3562a3ee3a0a32d3cc4ee476760f0;hp=daae811b2d779ab3338ea5eff614d6ec4397bb1a;hpb=31d85cd6b8e03c5ecc924ca8892906be1bab702f;p=senf.git diff --git a/Socket/FileHandle.cc b/Socket/FileHandle.cc index daae811..7aa9e24 100644 --- a/Socket/FileHandle.cc +++ b/Socket/FileHandle.cc @@ -33,7 +33,7 @@ #include #include #include -#include "Utils/Exception.hh" +#include "../Utils/Exception.hh" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// @@ -41,7 +41,7 @@ prefix_ void senf::FileBody::v_close() { if (::close(fd_) != 0) - throw SystemException(errno); + throwErrno(); } prefix_ void senf::FileBody::v_terminate() @@ -65,17 +65,17 @@ prefix_ bool senf::FileBody::blocking() const { int flags = ::fcntl(fd(),F_GETFL); - if (flags < 0) throw SystemException(errno); + if (flags < 0) throwErrno(); return ! (flags & O_NONBLOCK); } prefix_ void senf::FileBody::blocking(bool status) { int flags = ::fcntl(fd(),F_GETFL); - if (flags < 0) throw SystemException(errno); + if (flags < 0) throwErrno(); if (status) flags &= ~O_NONBLOCK; else flags |= O_NONBLOCK; - if (::fcntl(fd(), F_SETFL, flags) < 0) throw SystemException(errno); + if (::fcntl(fd(), F_SETFL, flags) < 0) throwErrno(); } /* We don't take POLLIN/POLLOUT as argument to avoid having to include @@ -96,7 +96,7 @@ prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, bool block) case EINTR: break; default: - throw SystemException(errno); + throwErrno(); } } while (rv<0); return rv>0; @@ -113,4 +113,5 @@ prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, bool block) // indent-tabs-mode: nil // ispell-local-dictionary: "american" // compile-command: "scons -u test" +// comment-column: 40 // End: